Load Script very inconsistent

I have this loading script. However, it’s very inconsistent. Randomly, it’ll show 1.4k or 2.4k assets which I know very well that’s not true.

local ts = game:GetService("TweenService")
local info = TweenInfo.new(.3, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)
local ContentProvider = game:GetService("ContentProvider")

local UI = script:WaitForChild("LoadingGui"):Clone()

repeat task.wait() until game:IsLoaded()

local assets = game:GetDescendants()
local MaxAssets = #assets

local plr = game.Players.LocalPlayer
local plrGui = plr:WaitForChild("PlayerGui")

local tween = ts:Create(UI.MainFrame, info, {BackgroundTransparency = 1})

UI.Parent = plrGui


for i, AssetToLoad in assets do
	ContentProvider:PreloadAsync({AssetToLoad})
	UI:WaitForChild("MainFrame"):WaitForChild("Counter").Text = i.."/"..MaxAssets
	
end

tween:Play()

tween.Completed:Connect(function()
	UI:Destroy()
	
end)

Isn’t PreloadAsync() only for things like decal and sounds? You’re loading every single instance, which probably isn’t necessary.

Oh. So what should I load then?

Sounds, decals, meshes, animations, and anything else that requires you to type in an asset ID.

Is there a function that only loads those things or? Is there an example I can implement to only do that?

For cleaner code, I would reccomend just creating a temporary object, preloading it, then deleting it.

local Animations = {
	14892039610;
	11766457253;
	11766177400;
	11760464346;
}
--//Creation and Loading
for i,v in ipairs(Animations) do
	local NewAnim = Instance.new("Animation")
	NewAnim.Parent = script
	NewAnim.AnimationId = "rbxassetid://"..v
	table.insert(P_Anims,NewAnim)
end

Content:PreloadAsync(P_Anims)
--//Cleanup
for i,v in ipairs(Animations) do
	v:Destroy()
end
table.clear(Animations)