Hi guys, how would i go about finding out if a character is idling or not? GetState() doesn't return an "Idle" state when a player is stationary. It returns "RunningNoPhysics" back to me, which i cannot use because while running, Getstate() will return both "RunningNoPhysics" and "Running" in intervals. There are 2 ways I've thought about.
Use 2 variables to find out the distance between the new and old position of the humanoidRootPart, on all 3 axis (X,Y,Z) so i will have a total of 6 variables, 1 old and 1 new for each axis. After that, grab the difference and make sure all 3 differences = 0 (Means not moving).
While running, i realised GetState() will only return between 200-300 "RunningNoPhysics". I will look more >300 "RunningNoPhysics" and decide if the player is moving or not.
I should also place the above 2 suggestions in a "spawn (function()end)" to keep the calculation constantly updated. Are there any better methods to deal with this? I can't seem to get "humanoid.Running:connect()" working. It got skipped even when I'm running..

3 comments
This seems like a possibility, but say if I move my mouse won't that reset the counter? Cause I want to play the Idle animation when the player is not moving. Meaning while he sorts his inventory and stuff, the Idle animation should still be playing.
The mouse has an event called Idle() which can work too
oh ok so i gotta use a combination of both idles? This is getting a lot more complicated than I've expected.