Is there any way to prevent a character rotating while an animation is being player on their humanoid?

So i have been trying to make a glory kill system but i cant find a way to prevent the 2 players from rotating using either first person or shift lock.

i have tried anchoring the humanoidrootpart which did not make much of a difference. i have also tried anchoring the torso but that made the animation break.

as you can see from the video, the character free to spin around using first person or shift lock. is there any way to prevent this? (freezing the player’s character in place without breaking the animation)

any help appreciated

1 Like

try saving the cameras position before it starts, then once the animation starts, set the cameras position to stay there until its over.

oldPos = game.Workspace.CurrentCamera.CFrame
-- play animation
while Animation.IsPlaying do
    game.Workspace.CurrentCamera.CFrame = oldPos
end

(This code probably wont work but it gives you a basic idea)

If you are fine with the player not being able to move their camera while the animation plays then this will work, otherwise I will attempt to find a better solution.

Temporarily disable the AutoRotate property of Humanoid. Re-enable after the animation has stopped.

4 Likes

that worked, thank you so much

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.