Using :GetMoveVector()

I am scripting a plane and for a laptop I have

inputS.InputBegan:connect(function(input)
		local code=input.KeyCode
		if code==Enum.KeyCode.W or code==Enum.KeyCode.Up then
			w=true
end)

to get when the player holds W and to then set W. But if a player is on a phone/iPad and has a joystick, how do I make an event for :GetMoveVector() to check when the player moves and holds the joystick forward as well as when it goes back to neutral or changes position? I can’t find any documentation on this developer.roblox.com

Does the character go sit on a seat to fly?

If so you might just need to make custom gui’s for it.

– Might Work but you should try to make custom buttons for it –
if not you can use humanoid.MoveDirection to find which direction they are trying to move.
(Teleport the character to a enclosed place)

​ Best way to check if the player is moving & what direction they are moving?

1 Like

Yes, the character sits on a seat. I thought of custom guis, but I would much prefer the virtual joystick eg like the helicopter in popular games such as jailbreak. I like the humanoid.MoveDirection idea but I think making the player then see the plane as if they are in it but be somewhere else is beyond my scripting abilities. Also I would prefer they are in the vehicle. Regarding joystick I got a script from someone else using InputChanged, checking if it is touch and then eg input.Delta.X > threshold, which was a great idea but didn’t quite work so well so looking for something different but same idea.