local humanoid = game.Players.LocalPlayer.Character.Humanoid
local plr = game.Players.LocalPlayer
local tool = plr.Character:FindFirstChild("Axe")
local swing = tool:WaitForChild("SwingAnimation")
tool.Equipped:Connect(function()
print(swing.Name,swing.ClassName)
local mouse = plr:GetMouse()
mouse.Button1Down:Connect(function()
local animplay = humanoid:LoadAnimation(swing)
end)
end)
19:34:42.242 - Stack Begin
[19:34:42.243 - Script 'Players.vf9r.Backpack.Axe.Swing', Line 4](rbxopenscript://www.dummy.com/dummy?scriptGuid=%7B908065f4-9765-429b-9ac8-81aede0cb6ef%7D&gst=2#4)
19:34:42.243 - Stack End
I am trying to make it so when I click with the axe equipped it plays an animation, ut it doesn’t play the animation, and says “WaitForChild” isn’t a thing when referenced with animation. If I don’t use WaitForChild or FindFirstChild when getting an instance, it says that it doesn’t exist.