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
 

Re: Rocket

Previous Thread :: Next Thread 
livefree75 is not online. livefree75
Joined: 02 Dec 2012
Total Posts: 58
23 Nov 2013 05:20 PM
Hi,
I'm using a rocket ship in my place, but something isn't right.
Whenever the rocket lifts off, it keeps going for 60 seconds, and then the engines stop, like it's supposed to, but then it just falls back to earth.
How do I get it to, after the engines stop, stay in that spot?
I've tried several things, but they either make the rocket keep going to infinity, go flipping nose-over-tail in a weird direction, or not lift off at all.

Here's my code:
-----------------------------------------------------------------------------
local engine = script.Parent.Parent.Engine
local bodyvelocity = engine.BodyVelocity
local bodygyro = engine.BodyGyro
local boomer = script.Parent.Parent.Boomer
local bodyvelocity2 = boomer.BodyVelocity
local engine3 = script.Parent.Parent.Hull
local bodyvelocity3 = engine3.BodyVelocity
local thing = script.Parent.Parent.Thing

local debounce = false


function onTouched(hit)
local humanoid = hit.Parent:findFirstChild("Humanoid")
if humanoid~=nil and debounce == false then
debounce = true

script.Parent.BrickColor = BrickColor.new(21)

wait(3)
thing.Anchored = false
thing.CanCollide = false
engine.Anchored = false
boomer.Anchored = false
wait(1)
script.Parent.Parent.u1.Anchored = false
script.Parent.Parent.u2.Anchored = false
wait(1)
script.Parent.Parent.b1.Anchored = false
script.Parent.Parent.b2.Anchored = false
wait(0.5)

local sound = Instance.new("Sound")
sound.SoundId = "3e856feae2ac35c3785acb6da2cfc5"
sound.Parent = script.Parent
sound.Volume = 4
sound:play()

bodyvelocity.maxForce = Vector3.new(0,20000000,0)
bodyvelocity2.maxForce = Vector3.new(0,20000000,0)
bodyvelocity3.maxForce = Vector3.new(0,20000000,0)
wait(60)

--bodyforce.force = Vector3.new(math.random(-10000,10000),math.random(-10000,10000),math.random(-10000,10000))
--wait(.5)

bodyvelocity.maxForce = Vector3.new(0,0,0)
bodyvelocity2.maxForce = Vector3.new(0,0,0)
bodyvelocity3.maxForce = Vector3.new(0,0,0)
bodygyro:remove()

sound.SoundId = "cbd49dd69aa81f52bd677a2723c9c61"
sound.Parent = script.Parent
sound.Volume = 4
sound:play()

script.Parent.BrickColor = BrickColor.new(28)

wait(1)

debounce = false
end
end


script.Parent.Touched:connect(onTouched)
------------------------------------------------------------------------------
Any help?
Report Abuse
Eternalfireeater is not online. Eternalfireeater
Joined: 01 May 2011
Total Posts: 10027
23 Nov 2013 05:34 PM
You have to SoundIds WAY off.

~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~
Report Abuse
JoshuaKempfert is not online. JoshuaKempfert
Joined: 16 Feb 2013
Total Posts: 2407
23 Nov 2013 05:35 PM
Just anchor it
Report Abuse
livefree75 is not online. livefree75
Joined: 02 Dec 2012
Total Posts: 58
23 Nov 2013 06:24 PM
Actually, this was just a free model but i do have some scripting experience.
Anyway, thanks for the help! :)
Report Abuse
livefree75 is not online. livefree75
Joined: 02 Dec 2012
Total Posts: 58
23 Nov 2013 06:55 PM
Wait... I can't figure out how to anchor the model.
Report Abuse
SimplyPure is not online. SimplyPure
Joined: 23 Jan 2011
Total Posts: 102
23 Nov 2013 10:22 PM
script.Parent.Anchored = true
Report Abuse
livefree75 is not online. livefree75
Joined: 02 Dec 2012
Total Posts: 58
24 Nov 2013 07:19 AM
Thanks! I never knew that anchoring one brick held the whole model!
I guess I should have thought it through...
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