I’m making a weapon, and during the attack animation I’m trying to disable movement, and I’ve tried a few ways to disable movement, like:
Background:
The weapon is an axe, and the rest of the script works, after you click,
- it checks limitations (like debounce or stamina),
- it checks if the player is in the air, and if they are falling or rising using the players Y velocity
- If the player is grounded: play the grounded attack
- If the player is falling: play the falling attack
- If the player is rising, start falling and play falling attack
Options to freeze player:
-
anchoring the HumanoidRootPart
Issues:
-Freezes player in place no matter where, even if slightly below ground
-Keeps current animation playing, if they were runnng they keep running -
controls:Disable()
Issues:
-Player has to release and press W again after the animation to move forward again, instead of just holding W the whole time -
Turning jump and walk power to 0
Issue:
-Can still jump for some reason idk why
walk power part works tho, I just feel like there is a better way tho idk
These are the best options i could find, but is there a more efficient way to stop movement or am i just doing something wrong