Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why my anims don't work after respawn?

So I made the script that changes the idle and stuff animations. But when I or people respawn the anims are gone. Please help.

The script by roblox:

Game.Players.PlayerAdded:connect(function(player) while not player.Character do wait() end local character = player.Character local animateScript = character.Animate animateScript.idle.Animation1.AnimationId = 'http://www.roblox.com/asset/?id=161100084' end)``

3 answers

✓ Accepted answer
game.Workspace.ChildAdded:connect(function(player) 
if Workspace[player.Name]:findFirstChild("Humanoid") ~= nil then
while not game.Players[player.Name].Character do
 wait() 
end 
end

local character = Workspace[player.Name]
local animateScript = character.Animate 
animateScript.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=161100084"
end)

You need to to put it when the player Respawns, not when the Character joins only.

Could you edit the post and provide us with some code? It makes our job a ton easier that way.

Game.Players.PlayerAdded:connect(function(player) while not player.Character do wait() end local character = player.Character local animateScript = character.Animate animateScript.idle.Animation1.AnimationId = 'http://www.roblox.com/asset/?id=161100084' end)``

This discussion is preserved as it was. New answers, comments, and votes are closed.