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

How to record input with mobile joystick?

Asked by 5 years ago
Edited 5 years ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

So I have a car, which works perfect with pc. But, when I try it on mobile, the input isn't recorded with the joystick, so the car doesn't turn anywhere. How would I record input with mobile joystick? Here is the script I would use(Only part of it though):

if _IsOn and ((not _MSteer) and (input.KeyCode==_CTRL["Throttle"] or input.KeyCode == _CTRL["Throttle2"])) or ((((_CTRL["MouseThrottle"]==Enum.UserInputType.MouseButton1 or _CTRL["MouseThrottle"]==Enum.UserInputType.MouseButton2) and input.UserInputType == _CTRL["MouseThrottle"]) or input.KeyCode == _CTRL["MouseThrottle"])and _MSteer) then
                if input.UserInputState == Enum.UserInputState.Begin then
    --forward script
                else
            --stop
                end
0
I don't know this for sure but I would read https://developer.roblox.com/api-reference/event/UserInputService/InputChanged , It probably fires something within that event Vulkarin 581 — 5y

Answer this question