generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Jetpack Just Won't Work...

Previous Thread :: Next Thread 
Dozer86421 is not online. Dozer86421
Joined: 18 Aug 2011
Total Posts: 726
24 Aug 2012 05:40 PM
I tried and failed to make a jetpack, and I got no Output too. Here's the script for the jetpack:

--Made by Dozer86421
local Tool = script.Parent
local EngineActive = false

Tool.Equipped:connect(function(mouse)
local User = Tool.Parent
mouse.Button1Down:connect(function()
EngineActive = true
local BG = Instance.new("BodyGyro", User.Torso)
local BV = Instance.new("BodyVelocity", User.Torso)
BV.velocity = Vector3.new(0,0,0)
while EngineActive and wait() do
BG.cframe = CFrame.new(User.Torso.Position,mouse.Hit.p)
BV.velocity = BG.cframe.lookVector * 200
end
end)
end)

Tool.Unequipped:connect(function()
EngineActive = false
BG:Destroy()
BV:Destroy()
end)

As you can see, I have no idea why it won't work! I'm not sure if you even have an idea why it won't work... Do you? If you do, please respond showing what I did wrong. Well, and how to fix it of course. You could also just post a fixed version of the script...
Report Abuse
Dozer86421 is not online. Dozer86421
Joined: 18 Aug 2011
Total Posts: 726
24 Aug 2012 05:46 PM
Help?
Report Abuse
bob354293 is not online. bob354293
Joined: 26 Oct 2008
Total Posts: 2609
24 Aug 2012 05:50 PM
why not just use the jetpack roblox made.....

~ + 1 Cookie for me. - 1 cookie for you. :D ~
Report Abuse
RA2lover is not online. RA2lover
Joined: 09 Nov 2008
Total Posts: 1254
24 Aug 2012 05:51 PM
you'll need to set the bodygyro/bodyvelocity's forces, else they default to a incredibly weak number.

also, your tool won't destroy the force objects when unequipped because your reference doesn't exist on the unequipped function's scope.
Report Abuse
RA2lover is not online. RA2lover
Joined: 09 Nov 2008
Total Posts: 1254
24 Aug 2012 06:00 PM
and it's gonna fail if you use it more than once.
Report Abuse
Dozer86421 is not online. Dozer86421
Joined: 18 Aug 2011
Total Posts: 726
24 Aug 2012 08:18 PM
Oh... I'll make sure to change it up. So, this should work, but I just need to make the variables not local and then boost the power? Sounds good.
Report Abuse
RA2lover is not online. RA2lover
Joined: 09 Nov 2008
Total Posts: 1254
25 Aug 2012 06:11 AM
nope. BG and BV are only on the button1down function's scope. as soon as it exits that function the handles are discarded.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image