I’m trying to fix a bug that happens after swinging a sword over 256 times. About halfway through a dungeon, if you’ve been swinging it enough, you’ll stop being able to.
I get an error that says:
AnimationTrack limit of 256 tracks for one animator exceed. No new tracks will be played.
I know the issue, but not how to fix it.
I’ve already tried a couple things so far to fix it, I’ll go in order.
-
Making a StarterCharacterScript that deletes and replaces the animator every 3 minutes or so, the problem is that it would make the tool idle animation be messed up.
-
Making something that stopped all playing animations and then replaced the animator, same issue.
-
Changing the toolscript to load the animation once in the script, with something looking like this:
for i, v in pairs(script:GetChildren()) do
if v.Name == "ANIM" then
table.insert(ANIMS,1,"animation")
ANIMS[1] = script.Parent.Parent.Humanoid:LoadAnimation(v)
end
end
-- The rest of the script that does stuff here, using ANIMS[num]:Play() to play it.
Problem with this is that I got the same error after a bit.
I’ve probably done a couple more things to see if it worked, but for now I can’t think of any. If you know how to solve this, please tell me. Anyways, thanks in advance.