I have a local script inside of StarterPlayerScripts that lets people punch by left clicking. There are zero errors, and when someone dies and respawns, they can't punch anymore. I have no idea why this is happening, but heres the important parts of the code.
UserInputService = game:GetService("UserInputService")
local player = game:GetService("Players").LocalPlayer
local char = player.CharacterAdded:Wait()
--all my vars
UserInputService.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 and cooldown == false and stunned == false then
--code that makes them punch
end
end)
char:WaitForChild("Right Arm").Touched:Connect(function(hit)
--code that hurts enemy
end
end)
char:WaitForChild("Left Arm").Touched:Connect(function(hit)
--code that hurts enemy
end
end)
Like I said before, there are no errors and everything stops working once you die. Help?

1 comment
this websites being retarted so can you add me on disc and help me fathawks#7923