How do you force a keycode when a gui button is clicked?

I’m making a game that uses keycodes but I also want it to support mobile by making it so that a keycode is “pressed” when you click on a gui.

1 Like

Couldn’t you just use the context action service and mark true to create a mobile button?

GuiButton.Activated:Connect(function(inputObject)
   if inputObject.UserInputType == Enum.UserInputType.Touch then
      print("Mobile player pressed gui button")
   end
end)