local Anims = game.ReplicatedStorage.MainGame.Animations:WaitForChild(Tool.Name)
local LoadedAnims = {}
local function LoadAnims()
for _, Anim in pairs(Anims:GetDescendants()) do
if Anim:IsA('Animation') then
ContentProvider:PreloadAsync({Anim})
local success, errorMsg = pcall(function()
if Anim.Parent == Anims then
LoadedAnims[Anim.Name] = Hum:LoadAnimation(Anim)
else
LoadedAnims[Anim.Parent.Name][Anim.Name] = Hum:LoadAnimation(Anim)
end
end)
if success then
print(Anim.Name)
else
warn(errorMsg)
end
end
end
end
This is where the script is located:
The animations:
I keep getting this error message:
"
Players.Dev_Transparent.Backpack.Fists.WeaponClient:33: attempt to index nil with ‘Anim1’
"
If anyone can help w/ this that would be greatly appreciated. Thanks!
if Anim.Parent == Anims then
LoadedAnims[Anim.Name] = Hum:LoadAnimation(Anim)
else
if LoadedAnims[Anim.Parent.Name] == nil then
LoadedAnims[Anim.Parent.Name] = {}
end
LoadedAnims[Anim.Parent.Name][Anim.Name] = Hum:LoadAnimation(Anim)
end