2DWorlds Forums
Rocket 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: Rocket Tool (/showthread.php?tid=1151)



Rocket Tool - Aroblix - 01-02-2011

The name of this tool is 'Rocket', not 'Rocket Launcher'.

Put this script in a tool. Clicking while this tool is selected will make your character go up. Clicking again will make it go down.

Code:
rocket = false
char = script.Parent.Parent.Parent.Character
link(script.Parent.MouseDown, function()
if rocket == false then
rocket = true
create("Rocket").Parent = char.Body
else
char.Body.Rocket.Parent = nil
end
end)