|
| 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 |
|
|
| 23 Nov 2013 05:34 PM |
You have to SoundIds WAY off.
~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~ |
|
|
| Report Abuse |
|
| |
|
| 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 |
|
|
| 23 Nov 2013 06:55 PM |
| Wait... I can't figure out how to anchor the model. |
|
|
| Report Abuse |
|
|
| 23 Nov 2013 10:22 PM |
| script.Parent.Anchored = true |
|
|
| Report Abuse |
|
|
| 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 |
|