Listen, I know this script is really simple and all but I keep trying but it just won't work. I've tried this:
function onButtonClicked() script.Parent.Parent.Parent.Parent.Character.Humanoid.Health = 0 end script.Parent.MouseButton1Click:connect(onButtonClicked)
local player = script repeat player = player.Parent until player:IsA("Player") --Get the Player. function onButtonClicked() player.Character:BreakJoints() --Kill the character when script.Parent is clicked. end script.Parent.MouseButton1Click:connect(onButtonClicked)