2DWorlds Forums
Reset Tool - Printable Version

+- 2DWorlds Forums (http://2dworlds.buildism.net/forum)
+-- Forum: 2DWorlds (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=4)
+--- Forum: Scripting (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=13)
+--- Thread: Reset Tool (/showthread.php?tid=1148)



Reset Tool - Aroblix - 01-02-2011

Put this script in a tool. Clicking while having this tool selected will kill the player that is using the tool.

Code:
link(script.Parent.MouseDown, function()
script.Parent.Parent.Parent.Character.Health = 0
end)



RE: Reset Tool - Jacob__mybb_import1 - 01-02-2011

Looks redundant, couldn't it just be this?

Code:
player = script.Parent.Parent.Parent
link(script.Parent.MouseDown, function()
player.Character.Health = 0
end)



RE: Reset Tool - Aroblix - 01-02-2011

I forgot to remove the player = script.Parent.Parent.Parent.
I edited my post.

Making a rocket tool for fun. =P