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

why does the default idle play sometimes?

game.Players.PlayerAdded:connect(function(player)
   player.CharacterAdded:connect(function(character)

    local animateScript = character.Animate
    animateScript.idle.Animation1.AnimationId = "rbxassetid://864296566"
end)
end)

i have the script thing, but why, sometimes, does the default roblox idle play? the animation is set at idle priority and everything

1 comment

0

There is no reason to downvote this as it's not necessarily his fault.

1 answer

✓ Accepted answer

This is possible because the script has already loaded the animation into the character. This is actually a bug with ROBLOX right now—it already started playing the animations, and even if you replace the script or the animation, it continues to play. This was referenced by zeuxcg here.

As he suggested, try adding this in your code:

for _,v in pairs(character.Humanoid:GetPlayingAnimationTracks()) do 
	v:Stop(0) 
end

If you need more help, check out the wiki thread on it.

1 comment

0

alright, thanks!

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