I'm trying to make an ice trail that follows a player as they move, but below them. How would I be able to detect if a players lower leg is moving so that I could duplicate the trail as they move?
✓ ANSWER ACCEPTED
How would I be able to detect if a players lower leg is moving?
2 answers
✓ Accepted answer
Try this, keep in mind this applies to the whole player, and not just the leg.
if *HUMANOID*.MoveDirection ~= Vector3.zero then
-- whatever
end
Check the 'AssemblyLinearVelocity' of one of the left leg's parts. Example:
local leftLeg = character:FindFirstChild("LeftLowerLeg")
if leftLeg.AssemblyLinerVelocity ~= Vector3.zero then
print("left leg is moving")
end
Also might be worth having a threshold for miniscule movements such as an idle animation.
1 comment
0
This answers my question too! Thanks.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
"WalkDirection is not a valid member of Humanoid "Workspace.iiDevPanda.Humanoid", what's the issue here?
Oh, sorry! It's actually .MoveDirection. I made a mistake when posting my answer.