Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Code to check if a player is walking is not working?

Im trying to just play a simple walking animation while the player is moving and holding a tool, and everything ive seen and read has said that this strip of code should let you use it in an if statement for if the player is walking, for example

if humanoid.MoveDirection.Magnitude > 0 then print("player is moving") end

However this just doesnt return anything for me, it is in a function that just checks if the parent tool is equipped but all other scripts around it in that function run just fine, is there a reason this isnt working or is there an alternative i can use?

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.