New Library: ActionContext

Howdy ya’ll, this post is to let you all know I released a handy little library recently: ActionContext. It’s an object-oriented way of using Roblox’s ContextActionService and alleviates a good amount of boilerplate code you’d find surrounding BindAction/UnbindAction calls. Rather than re-hash the documentation, I’ll just leave a quick bit of example code here.

local honkAction = {
    ActionName = "Honk",
    Inputs = { Enum.KeyCode.H, Enum.KeyCode.ButtonY },
    Handle = function (userInputState, inputObject)
        if userInputState == Enum.UserInputState.Begin then
            sound:Play()
        end
    end,
}
local actionContext = ActionContext.new({ honkAction })
-- Entering and leaving the car:
actionContext:Enter()
actionContext:Leave()
Continue reading “New Library: ActionContext”

Your Code Sucks: Improving Your Roblox Lua Coding Habits

You might have picked up one of these terrible coding habits when learning Roblox Lua. Let’s address that, shall we?

Listen… we gotta talk. You’ve got some really bad habits when it comes to scripting on Roblox. You clearly grew a lot since your days as a novice. You’ve been around the block enough times to know when it’s time to move past old habits and grow as a developer. Now’s the time to start improving your Roblox code.

OK, maybe not all of that first paragraph is completely true, but that bit about growing as a developer might interest you a whole ton. In this post, let’s talk about what you can do to clean up your coding habits.

A word of caution: this “advice” (if we’re calling it that) isn’t for the absolute novice. If you’re really-really new, just focus on making things work first and foremost. That’s more important. For the rest of you, let’s get into it!

Continue reading “Your Code Sucks: Improving Your Roblox Lua Coding Habits”

Shift Lock for Roblox on Mobile Devices

Add support for mouse lock (aka shift lock) for games on Roblox’s mobile app by adding this resource to your game/experience.

I made a handy resource for Roblox developers to support “Mouse Lock” (aka “Shift Lock”) mode in their games for mobile players!

Also consider getting the Model from the Roblox website so it’s available in Studio’s toolbox and on your Roblox account!

Continue reading “Shift Lock for Roblox on Mobile Devices”

Check out my new Internet face!

Felt like my Internet presence needed a fresh new look! Behold.

The image is a render of my Roblox avatar, with a white outline, blue background and a hint of a radial rainbow. I’m sporting the Vision Française glasses, the original Red Bow Tie, and my very own Ozzy’s Formal Top Hat which you can snag by using a code from my Roblox toy!

Continue reading “Check out my new Internet face!”