local Gun = script.Parent
local Animations = Gun:FindFirstChild("Animations")
Gun.Equipped:Connect(function(part)
print("equip")
local humanoid = Gun.Parent:FindFirstChild("Humanoid")
print(humanoid.Parent)
local Hold = humanoid:LoadAnimation(Animations.Hold)
Hold:Play()
end)
This gives the error 15:09:40.441 - Players.AthenaThorn.Backpack.Gun.GunScript:9: attempt to index nil with 'Hold'
But there's an animation called Hold in Animations folder.

1 comment
just put the animation in the script