Should I use a Preloader to load animations before playing them?

Is it better to use a Preloader in-game to load animations before playing animations on the Client?

Its definatly better to load animations before playing them if they are essential to your games asthetics.

Ok so if I use PreloadAsync to load my animations in before they are played, this can prevent the delaying at the beginning when it is played?

Example of what I’m saying is when you play an animation when the Tool is equipped, it usually lags in the beginning. Would using a Preloader prevent this from happening?

It should yes. Preloading removes the need to load before running so asuming this was the cause of the lag it would.
I should add that if it hasnt finished loading and tries playing you could still have that initial bit of lag.

1 Like

Animations should only be loaded when they need to be played. A script that loads many animations into a character’s ‘Humanoid’/‘Animator’ instance is a bad practice as it is possible for none of the loaded tracks to be played in that character’s life cycle.

Load animations once (directly before they need to be played) and cache them (via a table value) for later use.

1 Like

Thanks for letting me know. I am loading the animations before they are being played from a players tool. Would this work:

I have placed a LocalScript in ReplicatedFirst:

local ContentProvider = game:GetService("ContentProvider")

local AnimationsFolder = script:WaitForChild("Animations")

local R15Folder = AnimationsFolder:WaitForChild("R15")
local R6Folder = AnimationsFolder:WaitForChild("R6")

print("Preloading Animations...")


print("R6 Animations Loaded!")
1 Like