Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you make a reset script?

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)

1 answer

✓ Accepted answer
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)

2 comments

0

O.O Wow your good

0

Break all the joints with game.Workspace:BreakJoints() MWAHAHAHA!!!!

This discussion is preserved as it was. New answers, comments, and votes are closed.