I made a localScript witch is in StarterCharacterScripts, it contains the following code:
local Players = game:GetService("Players") local function onCharacterAdded(character) local humanoid = character:WaitForChild("Humanoid") for _, playingTracks in pairs(humanoid:GetPlayingAnimationTracks()) do playingTracks:Stop(0) end local animateScript = character:WaitForChild("Animate") animateScript.idle.Animation1.AnimationId = "rbxassetid://5432167890" animateScript.walk.WalkAnim.AnimationId = "rbxassetid://1759277502" animateScript.jump.JumpAnim.AnimationId = "rbxassetid://1760393958" animateScript.fall.FallAnim.AnimationId = "rbxassetid://1760423961" end local function onPlayerAdded(player) if player.Character then onCharacterAdded(player.Character) end player.CharacterAdded:Connect(onCharacterAdded) end Players.PlayerAdded:Connect(onPlayerAdded)
It doesn't work, so anyone who could help me?
You don't need to check for players being added within the player, all you need to do is have the stuff you had in the functions, but just leave them out of the functions. Since you said this was a local script, I'm assuming you placed it in character scripts.
wait() local animateScript = script.Parent.Animate animateScript.idle.Animation1.AnimationId = "rbxassetid://5432167890" animateScript.walk.WalkAnim.AnimationId = "rbxassetid://1759277502" animateScript.jump.JumpAnim.AnimationId = "rbxassetid://1760393958" animateScript.fall.FallAnim.AnimationId = "rbxassetid://1760423961"