I am trying to make a combat system using a tool, but I do not know how to make it where once the play equips the tool, the Idle animation will start then they can click to punch... If anyone could help me that would be great! here's what I have:
local tool = script.Parent
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:wait()
local punch = tool:WaitForChild("swing")
tool.Equipped:Connect()
local idle = script.Parent.Parent.Humanoid:LoadAnimation(script.Idle)
idle:Play()
end) <-- Error for this end

1 comment
Please use code block.