hey. i'm trying to make a button in a GUI where, when you press it, your character dies. i've tried this but it doesn't seem to work. this is under the button, so that the button is the parent of the button. any help?
function parentPressed(player)
player.Character.Humanoid.Health = 0
end
script.Parent.MouseButton1Down:connect(parentPressed)

1 comment
Is this a local or server script?