Works perfectly fine in studio as mobile, yet ingame when on a mobile device, it does not work at all. Why is this the case?
local ContextActionService = game:GetService("ContextActionService") local UserInputService = game:GetService("UserInputService") local playergui = game:GetService('Players').LocalPlayer:WaitForChild('PlayerGui') local mobilecontrols = playergui.MobileMoves.Frame if (UserInputService.KeyboardEnabled) then print("Is PC player") else print("Is MOBILE player") local function STANDAPPEAR(SummonStand,InputState,InputObject) if InputState == Enum.UserInputState.Begin then if SummonStand == "summonstand" then mobilecontrols.Move1.MouseButton1Down:Connect(function() print("Check: Appeared") end) end end end end ContextActionService:BindAction("summonstand", STANDAPPEAR, false, Enum.KeyCode.Q)
Mobile Moves is a gui, along with a frame inside the gui, including the textbuttons called "Move1"