I'm trying to make a simplified script for weapon animations, however, it doesn't work after the player resets.
Output logs
14:49:24.953 - LoadAnimation requires the Humanoid object (Player1.Humanoid) to be a descendant of the game object
14:49:24.954 - Stack Begin
14:49:24.954 - Script 'Players.Player1.Backpack.DBlade2.LocalScript', Line 7
14:49:24.954 - Stack End
local tool = script.Parent
local Hold = script.Parent.Hold
local Player = game:GetService("Players").LocalPlayer
while not Player.Character do wait() end
local Character = Player.Character
local Human = Character:WaitForChild("Humanoid")
local IdleTrack = Human:LoadAnimation(Hold)
local function onEquip()
IdleTrack:Play()
end
local function onUnequip()
if IdleTrack then
IdleTrack:Stop()
end
end
local function onActivate()
end
local function onDeactivate()
end
tool.Equipped:connect(onEquip)
tool.Unequipped:connect(onUnequip)
tool.Activated:connect(onActivate)
tool.Deactivated:connect(onDeactivate)
