Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My ContextActionService Button won't work how do I fix it?

Asked by 2 years ago
local ContextActionService = game:GetService("ContextActionService")

local function handleAction(Action, State, _)
    if Action == Enum.KeyCode.B and State == Enum.UserInputState.End then

    end
end

ContextActionService:BindAction("Press B", handleAction, true, Enum.KeyCode.B)
ContextActionService:SetDescription("Press B", "Emulates the letter B")
ContextActionService:SetPosition("Press B", UDim2.new(0.455, 0, 0.043, 0))
ContextActionService:SetTitle("Press B", "B")

here is the code I have

Answer this question