I want to make it so that when I punch a tree log 5 times it will be destroyed, but it isn't working, here it is
local Log = script.Parent
Log.ClickDetector.MouseClick:connect(function() local Clicks = 0 Clicks = Clicks + 1
if Clicks == 5 then
Log:Destroy()
game.Workspace.Tree.Leaves.Anchored = false
game.Workspace.Tree.Leaves.CanCollide = true
wait(2)
game.Workspace.Tree.Leaves.BrickColor = BrickColor.new ("Fawn brown")
wait(3)
game.Workspace.Tree.Leaves:Destroy()
end
end)
