Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you make a reset script?

Asked by
Japhie 20
10 years ago

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

Log in to vote
0
Answered by 10 years ago
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)
0
O.O Wow your good Japhie 20 — 10y
0
Break all the joints with game.Workspace:BreakJoints() MWAHAHAHA!!!! OniiCh_n 410 — 10y
Ad

Answer this question