When this happens, not just new animations, but currently playing default roblox animations will stop playing as well. after a few seconds of this, the player model becomes completely static.
I have tools in my game that add animations to the player, so thats the only thing I can think of that could possibly be causing this. However, each of these tools only have two animations each. Animations are only loaded into the humanoid upon equipping the tool, and only if those animations havent been loaded already. I don’t see how they could possibly be causing this.
Equip code if you want to review it:
script.Parent.Equipped:Connect(function()
if not tool.Parent:IsA("Model") then return end
char = tool.Parent
hum = char:FindFirstChildOfClass("Humanoid")
--Do nothing if the tracks already exist, load the tracks if not
swingtrack = swingtrack or hum:LoadAnimation(script.Parent.Swing)
idletrack = idletrack or hum:LoadAnimation(script.Parent.Idle)
--If this is a new user of the tool, load the animations into their humanoid instead
if lasthum and lasthum ~= hum then
swingtrack = hum:LoadAnimation(script.Parent.Swing)
idletrack = hum:LoadAnimation(script.Parent.Idle)
end
lasthum = hum
hWeld.C1 = script.Parent.Grip
hWeld.Part0 = char.RightHand
hWeld.Parent = tool
idletrack:Play()
end)
I double checked with ctrl + f, this is the only place in the code where animations are loaded. Not to mention, this error generally happens well after I’ve equipped the tool.
I ran a control test, and found that this error occurs after roughly 192 uses of the tool.
I ran a second test, this time playing for the same amount of time. I equipped the tool, but did not use it at all. The same animationTrack overload error occurred. In this test, only one event was triggered by the tool, that being the equip event. I am now 95% confident that whatever is happening has nothing to do with the tool, and that something else must be causing it
The code above that segment saves a variable called lasthum. “lasthum” stands for last humanoid, or the last humanoid that had equipped the tool. if the humanoid is the same (i.e. if the holder of the tool unequips and reequips the tool) then it does not reload the track.
That wouldnt have been it regardless though, as I did a test where I only equipped the tool once and I still got this error after about 10 minutes.
Update: I made a script inside the character that takes note of every unique track that gets played within the character’s humanoid. Every time a new track gets played that the script has not encountered yet, it adds it to an array within the script.
By the time this error occurred, only 12 of the loaded tracks had been used. This means that there are 244 loaded tracks that aren’t getting used. Something is progressively loading in tracks without playing them.
I’ve systematically gone through every single script that I’ve added into my game, using the ctrl + f function to search for any line containing “:LoadAnimation”. I have not found anything that may be inside an infinite loop, and the only time any of these lines are found are when they are inside of a tool.Equipped event. The only explanation I can think of is that it has something to do with Roblox’s character scripts, but that explanation makes no sense. There are thousands of games that use the default Roblox Character system with zero problems, so this explanation seems like the least likely one that I have come up with thus far. I am completely lost as to what could be causing this.
I have conducted another test: I equipped the tool, and then did nothing with it. I then did nothing but spam the WASD keys for about 5 minutes. The error occurred again
I did a second test leaving out the tool entirely. At this point the only scripts acting upon the player’s Character are the player character scripts themselves. I spawned in, began spamming inputs, and after 5 minutes I got the error to occur again. It seems highly unlikely that it is a problem with the Roblox Character, but at this point it is the only remaining explanation. Should I submit a bug report?