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

Why isn't the ContextActionService button not changing position?

Asked by 4 years ago

I'm trying to position ContextActionService button by using contextactionservice:SetPosition(actionName, UDim2.new(x1, x2, y1, y2))

but it's not working... Here's the full script

local cas = game:GetService("ContextActionService")

local actionName = "actionName"

function actionFunction()
    print("It's working")
end

cas:BindAction(actionName, actionFunction, true, Enum.KeyCode.Q)
cas:SetPosition(actionName, UDim2.new(0.023, 0, 0.446, 0))

it's written in a LocalScript

if you guys have more questions, please feel free to ask me... Thank you in advance

Answer this question