i put death animation to the game character and doesn't respawn (sorry for my bad english)
script.Parent.dechanimeichion.OnServerEvent:Connect(function(_, anim, humanoid, char, root) humanoid:LoadAnimation(anim):Play() root.Anchored = true end) --anim = the death animation --humanoid = the humanoid from the character --char = the character --root = HumanoidRootPart from the character
You have to use :LoadCharacter() wich can respawn the player, this is a method from Player object, also to make good questions make them more descriptive.
script.Parent.dechanimeichion.OnServerEvent:Connect(function(plr, anim, humanoid, char, root) humanoid:LoadAnimation(anim):Play() local animationTrack = humanoid:LoadAnimation(anim) -- Get the animation Track local Delay= animationTrack.Length -- get the length root.Anchored = true wait(Delay) -- wait the animation to be completed plr:LoadCharacter() end)
Mark this as answered if this answered your question!