How do I freeze the player during an animation?

To elaborate a bit on the title, I am currently making a two player fatality animation and I need the players to freeze during the animation. I’ve tried walk speed & jump power but you can turn using shift lock, I’ve also tried anchoring the player’s humanoid root part during the animation but it doesn’t work, even when I set it to be archivable. I’m looking back to anchoring the player during the animation, but I don’t mind trying other methods of freezing the player.
Here is some of the code.
Edit: This is a server side module script

function combatModule:Fatality(plrChar, emyChar, fatalityName)
	local emyHrp = emyChar.HumanoidRootPart
	local emyHum = emyChar.Humanoid
	local plrHrp = emyChar.HumanoidRootPart
	local plrHum = plrChar.Humanoid
	
	local fatalityPlrAnim = script.Parent.Combat.FatalitiesPlayer:FindFirstChild(fatalityName)
	local fatalityEnemyAnim = script.Parent.Combat.FatalitiesEnemy:FindFirstChild(fatalityName)
	local fatalEnemy = emyHum:LoadAnimation(fatalityEnemyAnim)
	local fatalPlr = plrHum:LoadAnimation(fatalityPlrAnim)
	emyHrp.CFrame = (plrHrp.CFrame * CFrame.new(0,0,2.8))
	fatalEnemy:Play()
	fatalPlr:Play()
	plrHum.WalkSpeed = 0
	emyHum.WalkSpeed = 0
	if fatalPlr.Stopped and fatalEnemy.Stopped then
		fatalEnemy.Stopped:Wait()
		emyHum:TakeDamage(99999)
		plrHum.WalkSpeed = 16
		emyHum.WalkSpeed = 16
	end
end
1 Like

You can always try disabling the players movement module or disable the walking keybinds.

1 Like

if the code is server side then try to anchor all of the body part in the character if they are on the client the try to use The PlayerModule to disable player movement

1 Like

The issue with anchoring all the parts is that it stops the animation from playing, so I can only anchor the HRP without it causing any issues, it is server side btw.

1 Like

Have you tried welding them to an anchored part?
make sure to do this on a server script to avoid exploitation

The best method, that I have used is storing the WalkSpeed and JumpHeight, only to reload them after the animation has played. The reason I do it like this is because I primarily work in combat WITH cutscenes and moving objects, and delayed network with anchoring can cause visually un-appealing looks.

2 Likes