My mobile buttons won't move to the place I script them to go

Hello, I’ve been trying to make this script that moves a button on mobile through UDim2, however it doesn’t seem to work when I hit play. Any suggestions to fix this issue?
Heres the code:
ContextActionService:BindAction(“Left”, onLeft, true, “a”, Enum.KeyCode.Left,
Enum.KeyCode.DPadLeft)
ContextActionService:SetPosition(“Left”, UDim2.new(1, -70, 0, 10))

1 Like

Is this where its going?

Instead of that script, I would do this. I bet this will get it in the right spot.

ContextActionService:BindAction(“Left”, onLeft, true, “a”, Enum.KeyCode.Left,
Enum.KeyCode.DPadLeft)
ContextActionService:SetPosition(“Left”, UDim2.new(1, -70, 1, -120)

If this doesn’t work, you know where to find me. WE

Well I’m trying to experiment with it to find the right spot but its stationary at a higher area near the middle above the museum icon. I’ll try it now.

Yeah update: still doesn’t budge no matter what values I insert.

The code seems to work for me when I test it in studios… Idk what’s goin on with yours.

Well, the exact code I used was this (not sure if it will make any difference but ya know just in case):

local ContextActionService = game:GetService("ContextActionService") 

function onLeft() 
	print("TEST") 
end 

ContextActionService:BindAction("Left", onLeft, true, "a", Enum.KeyCode.Left, Enum.KeyCode.DPadLeft) 
ContextActionService:SetPosition("Left", UDim2.new(1, -70, 0, 10))