Hi,
I’m trying to make mobile buttons for a game of mine, and I’m setting up a move set for a certain weapon.
So far, I have 5 working buttons in this specific script (Moves E, R, T, Y, and Q) which all are positioned with UDim2 correctly and have their images that I’d set. The problem came up with the last 4 buttons, which are formatted in the script the exact same way as the buttons made prior, yet are stuck stacked at the position {0, 0},{0, 0} without the asset icon I’d given them.
What it looks like:
I have tried positioning the buttons in various different locations, to no avail. The only topic I could find similar to this was this post in August, and it doesn’t seem like it was solved.
My mobile buttons won’t move to the place I script them to go
The code in the block below displays what the broken buttons are supposed to do, yet it seems that the SetPoisition and SetImage are being ignored. The script for these buttons was copied directly from the working buttons prior to it.
local fmove = contextActionService:BindAction("fmove", handleAction, true, Enum.KeyCode.F, Enum.KeyCode.ButtonY)
contextActionService:SetPosition("fmove",UDim2.new(0.078, -300, 0.2, -25))
contextActionService:SetImage("fmove","http://www.roblox.com/asset/?id=196377547")
local zmove = contextActionService:BindAction("zmove", handleAction, true, Enum.KeyCode.Z, Enum.KeyCode.ButtonY)
contextActionService:SetPosition("zmove",UDim2.new(0.07, 30, 0.2, 110))
contextActionService:SetImage("zmove","http://www.roblox.com/asset/?id=2190354994")
local nmove = contextActionService:BindAction("nmove", handleAction, true, Enum.KeyCode.N, Enum.KeyCode.ButtonY)
contextActionService:SetPosition("nmove",UDim2.new(0.07, -70, 0.2, 110))
contextActionService:SetImage("nmove","http://www.roblox.com/asset/?id=2311956965")
local gmove = contextActionService:BindAction("gmove", handleAction, true, Enum.KeyCode.G, Enum.KeyCode.ButtonY)
contextActionService:SetPosition("gmove",UDim2.new(0, -20, 0, 110))
contextActionService:SetImage("gmove","http://www.roblox.com/asset/?id=4675182940")
I do not have much experience with scripting buttons like this, so this could very easily just be a newbie mistake on my part, but I’d still appreciate any help possible.