function onClick (part) local.humanoid.health(0) end
sorry im a new scripter! if you have any tips please leave them below and thanks!
Your revised script:
function click() game.Players.LocalPlayer.Character.Humanoid.Health = 0 end script.Parent.MouseButton1Click:connect(click)
1] You don't need the 'on' when you put 'onClick'. Also, when using a GUI, you don't need to specify "part" unless you're using a brick that kills the user.
2] When you're showing the value you don't need the parenthesis (0), it's better to use '= value' instead.
Hope this helped a bit!