I'm having some issues with this! The output doesn't seem to be saying anything. Help!
local tool = script.Parent
local player = game.Players.LocalPlayer
local animationtrack
local animtable = {tool.Animation, tool.Animation2}
tool.Equipped:connect(function()
local c = player.Character
local h = c:WaitForChild("Humanoid")
animationtrack = h:LoadAnimation(animtable[1])
animationtrack:Play()
end)
tool.Activated:connect(function()
local c = player.Character
local h = c:WaitForChild("Humanoid")
animationtrack = h:LoadAnimation(animtable[2])
animationtrack:Play()
end)
tool.Unequipped:connect(function()
animationtrack:Stop()
end) |