I was having an issue of animations stuttering the first time they're played, so I looked up a way to fix them and ended up writing the following:
local entAnims = entModel.Humanoid.Animator:GetDescendants()
for index, animation in entAnims do
if not animation:IsA("Animation") then
table.remove(entAnims, index)
end
end
ContentProvider:PreloadAsync(entAnims) --game:GetService("ContentProvider")```
After testing with printing the `entAnims` table out, the animations are correctly being stored without having any leftovers. ContentProvider isn't returning any errors in the output either, but the animations seem to not actually be preloaded and still stutter the first time.
This code is only called when the player switches between different characters and I know that's working as well because of the previous tests with the `entAnims` folder. Is there something I missed or put in the wrong spot?