Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why my anims don't work after respawn?

Asked by 9 years ago

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

Log in to vote
1
Answered by
Hybric 271 Moderation Voter
9 years ago
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.

Ad
Log in to vote
-1
Answered by 9 years ago

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

Log in to vote
-1
Answered by 9 years ago

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)``

Answer this question