Hi, so I am having this issue. Every time i play an animation for the first time there’s a delay or lag on it.
Here’s what I want to get rid
Notice when i equip the weapon there’s a delay on the animation. This only occurs once but in every animation which is kind of annoying. I tried preloading animation which are save in a folder
local ContentProvider = game:GetService("ContentProvider")
local RS = game:GetService("ReplicatedStorage")
local Animations = RS:WaitForChild("Animations")
local Start = os.clock()
ContentProvider:PreloadAsync(Animations:GetDescendants())
local End = os.clock() - Start
print("Took "..End.." To load animations")
-- I have tried different approach such as : (Scripts are seperated)
for i,v in pairs(Animations:GetChildren()) do
ContentProvider:PreloadAsync({v})
end
-- I also tried creating an animation instance incase it doesn't work and yep it didn't
for i,v in pairs(Animations:GetChildren()) do
ContentProvider:PreloadAsync({v.AnimationId})
end
I’ve tried looking up some solution to this issue but no can do. They say I only need to preload it but it doesn’t work. Am I preloading the animations right?
It took 0.001 to weld and play the animation i don’t see any reason for delay
I
2nd attempt