Stun the Character/Humanoid

So I have a combat script. And I wanted to make it so that when a player gets hit, they get stunned (not being able to move for a short time).
I’ve tried changing the WalkSpeed and it works, but I wanna know if there is an alternative for it?
I tried PlatformStand, which stuns the player but for some reason it sinks the player down?

Maybe just anchore their humanoid root part for a period of time

2 Likes

This worked great! It solved my issue but I just decided to make it’s walkspeed to 0.5 instead of complete no movement.

if they are in air when they get stunned, they will float.

just saying

3 Likes

You could set both WalkSpeed and JumpPower to 0, but the problem is, exploiters would be able to modify these values on their client and their movement would replicate. Anchoring is much safer. If you are bothered by stunned characters not falling, you could just add a raycasting system to look if there is a Part right below them and if not, move them to the ground.

1 Like