i made a jump animation script but when i did it worked but when you reset and or respawn it does not run anymore heres the script
Game.Players.PlayerAdded:connect(function(player) while not player.Character do wait()end local character=player.Character local animateScript=character.Animate animateScript.jump.JumpAnim.AnimationId="http://www.roblox.com/asset/?id=253057842" end)
The reason it only works until you reset/respawn is because the AnimationId is not being changed when the character is added, so the animation does not work and the script will not run.
To fix this, you should use the CharacterAdded event to make sure the AnimationId of the animation is changed every time the player respawns.
Game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) --CharacterAdded event being added to the script. local animateScript=character:WaitForChild("Animate") --Waits until Animate is found in the character. animateScript.jump.JumpAnim.AnimationId="http://www.roblox.com/asset/?id=253057842" end) end)
I hope my answer helped you. If it did, be sure to accept it.