I want to be able to tell when some one is walking and jumping!
And which direction they are moving in.
Like this:
W = Forward
S = Down
A = Left
D = Right.
How do I do this?
I want to be able to tell when some one is walking and jumping!
And which direction they are moving in.
Like this:
W = Forward
S = Down
A = Left
D = Right.
How do I do this?
You can use the following events:
To detect the direction (a.k.a. “Key Inputs”) you can use the UserInputService events like InputBegan and map the keys to the direction they refer to.
Problem with that.
Some people use mobile or change the keys they use to play.
Check Humanoid.MoveDirection.Magnitude and see if the value is greater than 0. If it’s 0, it means they are not inputting anything to make their character move. However, this still runs even if the WalkSpeed is at 0 when the player tries to move. Just be aware of that.
Humanoid events will still fire normally.
For mobile users, you can utilize the InputObject.Delta property from the InputObject that is passed to the first argument of the InputBegan
connection.
How would they?
Running and Jumping events will fire when a Humanoid
is running and jumping respectively.
You can use Humanoid.MoveDirection
to get the directional vector of the model’s movement.
What EgizianoEG says is very true since those links are useful for you but you could also run your game and select your player’s character and there is an animate script which detects when a player moves that is so that you have a concept of how use these functions if you need help I leave you the following topic:
Problem with this is i only get 1 and I cant tell which direction there facing. I can only tell if they are moving in a direction