Cannot figure out why ragdoll resets animation

Hey there!
I am currently working on a neck snapping animation. Essentially the player will have their neck snapped (via played animation,) and then fall to the ground via ragdoll. Here is the ragdoll module I am currently using: R15 / Rthro Ragdolls.

The issue I am facing reverts the animation (turns head back into original position,) then ragdolls the character. I believe I originally had it working properly but I forgot what I changed since then. :roll_eyes:

Here is my relevant code:
As you can see, I integrated a flag to enable/disable killing all character animations. This does not fix my issue. This is a LocalScript.

local LocalPlayer = game:GetService("Players").LocalPlayer
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Events = ReplicatedStorage:WaitForChild("Events")
local RagdollHandler = ReplicatedStorage:WaitForChild("Scripts").RagdollHandler


Events.Ragdoll.OnClientEvent:Connect(function(Humanoid, KillAnimation)
	local Character = Humanoid.Parent
	local setEnabled = Humanoid:GetState() ~= Enum.HumanoidStateType.Physics
	Humanoid:ChangeState(setEnabled and Enum.HumanoidStateType.Physics or Enum.HumanoidStateType.GettingUp)
	Character.Animate.Disabled = setEnabled

	if setEnabled and KillAnimation then
		for _,v in pairs(Humanoid:GetPlayingAnimationTracks()) do

Next, here is the server code which fires the Ragdoll remote event.

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Events = ReplicatedStorage:WaitForChild("Events")
local ChangeEnergy = Events.ChangeEnergyBindable

local TS = game:GetService("TweenService")
local anim = Humanoid:LoadAnimation(game.ReplicatedStorage.Animations["NeckSnap"])
-- ragdoll and neck snap animation
TS:Create(anim,, {TimePosition = 0.15}):Play()
Events.Ragdoll:FireAllClients(Humanoid, false)
-- revive
Events.Ragdoll:FireAllClients(Humanoid, true)

Any help would be greatly appreciated. I have been stuck on this problem for a couple days now.

1 Like