Ragdoll Animation Running But Not Playing

I checked with prints and the animation runs but doesnt play … I suspect this may have something to do with the humanoid being dead but I’m not sure. Here are the scripts: ( Also im only using a remote becuase i was checking to see if it made a diff, but nothing seems to make a diff )

Local Script: Located in starter player scripts

local rs = game:GetService("ReplicatedStorage")
local char = script.Parent
char.Humanoid.Died:Connect(function()
	rs:WaitForChild("Remotes").Ragdoll:FireServer(char)
end)

serverscript: located in serverscriptservice

local rs = game:GetService("ReplicatedStorage")

rs:WaitForChild("Remotes").Ragdoll.OnServerEvent:Connect(function(player, char)

	
	
		
	local ragdollAnim = char.Humanoid:LoadAnimation(script.anim)
	ragdollAnim:Play()
	ragdollAnim.Stopped:Connect(function()
		print("played")
	end)
	
end)

NotbreakingJoinsScript: Located in serverscriptservice

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local humanoid = character:WaitForChild("Humanoid")
		humanoid.BreakJointsOnDeath = false
	end)
end)

You can just make the client animate using a localscript, instead of the server doing it.
Something like this:

local replicatedStorage = game:GetService("ReplicatedStorage")
local character = script.Parent
character:WaitForChild("Humanoid").Died:Connect(function()
	local new = character:WaitForChild("Humanoid"):LoadAnimation(replicatedStorage:WaitForChild("RagdollAnimation"))
	new:Play()
	new.Ended:Connect(function()
		print("Finished playing.")
	end)	
end)

I know, I tried that and it didn’t work.I switched to a remote hoping for a better outcome, I can reformat it to only local script, gimme a sec ill send u that code

yea tried that no difference :frowning: heres the code i used

local rs = game:GetService("ReplicatedStorage")
local char = script.Parent
char.Humanoid.Died:Connect(function()
	

	local ragdollAnim = char.Humanoid:LoadAnimation(script.Animation)
	ragdollAnim:Play()
	ragdollAnim.Stopped:Connect(function()
		print("played")
	end)
	--rs:WaitForChild("Remotes").Ragdoll:FireServer(char)
end)
local rs = game:GetService("ReplicatedStorage")

Odd, because it works for me.
image

BRUH what is my luck sometimes bro, did u add the breakjoints on death script?


also this is what happens. I konw the animation is a proper animation cause i used it on a npc and it works

No before the .Died connection I added character:WaitForChild("Humanoid").BreakJointsOnDeath = false

local replicatedStorage = game:GetService("ReplicatedStorage")
local character = script.Parent
character:WaitForChild("Humanoid").BreakJointsOnDeath = false
character:WaitForChild("Humanoid").Died:Connect(function()
	print('died')
	local new = character:WaitForChild("Humanoid"):LoadAnimation(replicatedStorage:WaitForChild("RagdollAnimation"))
	new:Play()
	new.Ended:Connect(function()
		print("Finished playing.")
	end)	
end)

ok ill try that, hopefully this works

local replicatedStorage = game:GetService("ReplicatedStorage")
local character = script.Parent
character:WaitForChild("Humanoid").BreakJointsOnDeath = false

character:WaitForChild("Humanoid").Died:Connect(function()
	local new = character:WaitForChild("Humanoid"):LoadAnimation(replicatedStorage:WaitForChild("Anims"):WaitForChild("RagdollAnimation"))
	new:Play()
	new.Ended:Connect(function()
		print("Finished playing.")
	end)	
end)

i used ur code and adjusted it and still nothing happens, ill try replacing the animatoni with a new one ig, maybe its the animation

I think its the animation because I’m just using a roblox dance animation and it works.

also this local script is in starter char scripts

ohk ill try that but its odd causei copy pasted an animatino that works on an npc but lemme try

changed the animation still doesnt work :frowning:

the player just freezes upon death

oh wait im sped ima kms I FORGOT TO QUACKING MAKE IT r6 ONLY IM GONNA END MY LIFE

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