function onClick (part)
local.humanoid.health(0)
end
sorry im a new scripter! if you have any tips please leave them below and thanks!
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!
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
I'm assuming he's using a ClickDetector, not a GUI.
No, actually it's unclear isn't it. The function name can be anything, but sure. This script isn't bad.