Hello! I have recently made a falling animation! The script replaces the default animation to the one I made. However it only does this once. Then if I die or reset it goes back to the normal animation. How can I make it so it will change the animation always?
Here is the script, Also I have tried while true do, but that doesn't work.
game.Players.PlayerAdded:connect(function(player) while not player.Character do wait() end local character = player.Character local animateScript = character.Animate animateScript.fall.FallAnim.AnimationId = 'http://www.roblox.com/asset/?id=196505089' end)
Simply use the character added event which will fire every time a character is "added" to the player, i.e. every time they respawn.
The character added event has 1 built in parameter equal to the character that has just been added.
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(chr) print("A character was added to "..plr.Name) end) end)
Instead of doing PlayerAdded, Try this: Add a localscript inside the StarterGui:
while not player.Character do wait() end local character = player.Character local animateScript = character.Animate animateScript.fall.FallAnim.AnimationId = 'http://www.roblox.com/asset/?id=196505089'