RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"elseif statement doesnt work"
The problem with your script is that you are comparing a Vector3's magnitude to 0. The magnitude of a Vector3 is the length of the vector, which is always a positive number or zero. It cannot be less than zero. So, your condition `Humanoid.MoveDirection.Magnitude < 0` will never be true. If you want to check if the humanoid is not moving, you can compare the magnitude to 0 like this: ```lua if Humanoid.MoveDirection.Magnitude == 0 then CrouchAnimm:Stop() end ``` This will stop the crouch animation when the humanoid is not moving.