Basically this is a launch script that will work based on the new nerfed explosions and physics engine. I keep having issues pop up with Lines 64, 65, and 77. Can anyone read through this and help me correct it? (I am fairly new to RBX.Lua and scripting in Roblox as a whole so I apologize if I come off as "stupid").
What it is showing in the dev console and the output is at the very bottom, also, if you find any other errors, please let me know.
The issue now is it lags out the server and studio to a crash after the script has gotten to Lines 40-42. (I am unsure if it gets to Line 42 because nothing happens after it displays "Ignition" in the Dev Console and as a hint)
--Also how would I remove the hints after they have been displayed? (currently they are just layering over each other.)
print("Script Active. Waiting Launch.")
local h = Instance.new("Hint",Workspace) h.Text = "Omicron I Ready for Launch."
Main = game.Workspace.Rocket.RocketModel.Head
Top = game.Workspace.Rocket.RocketModel.Head2
Booster = game.Workspace.Rocket.RocketModel.Booster
GantrySide = game.Workspace.Gantry.gantrymiddle.Side
Middle = game.Workspace.Rocket.RocketModel.Middle
game.Workspace.Rocket.Explosiontrigger.ClickDetector.MouseClick:connect(function (onClicked)
local h = Instance.new("Hint",Workspace) h.Text = "Omicron I Launching in 10"
print("Omicron I Launching in 10")
wait(1)
local h = Instance.new("Hint",Workspace) h.Text = "Omicron I Launching in 9"
print("Omicron I Launching in 9")
wait(1)
local h = Instance.new("Hint",Workspace) h.Text = "Omicron I Launching in 8"
print("Omicron I Launching in 8")
wait(1)
local h = Instance.new("Hint",Workspace) h.Text = "Omicron I Launching in 7"
print("Omicron I Launching in 7")
wait(1)
local h = Instance.new("Hint",Workspace) h.Text = "Omicron I Launching in 6"
print("Omicron I Launching in 6")
wait(1)
local h = Instance.new("Hint",Workspace) h.Text = "Omicron I Launching in 5"
print("Omicron I Launching in 5")
wait(1)
local h = Instance.new("Hint",Workspace) h.Text = "Omicron I Launching in 4"
print("Omicron I Launching in 4")
wait(1)
local h = Instance.new("Hint",Workspace) h.Text = "Omicron I Launching in 3"
print("Omicron I Launching in 3")
wait(1)
local h = Instance.new("Hint",Workspace) h.Text = "Omicron I Launching in 2"
print("Omicron I Launching in 2")
wait(1)
local h = Instance.new("Hint",Workspace) h.Text = "Omicron I Launching in 1"
print("Omicron I Launching in 1")
wait(1)
local h = Instance.new("Hint",Workspace) h.Text = "Ignition"
print("Ignition")
wait(1)
explosion = Instance.new("Explosion")
explosion.BlastRadius = 50
explosion.BlastPressure = 1000
explosion.DestroyJointRadiusPercent = 0
explosion.Position = game.Workspace.Rocket.RocketModel.Booster.Position
explosion.Parent = game.Workspace.Rocket.RocketModel.Booster
wait(1)
explosion = Instance.new("Explosion")
explosion.BlastRadius = 50
explosion.BlastPressure = 1000
explosion.DestroyJointRadiusPercent = 0
explosion.Position = game.Workspace.Rocket.RocketModel.Booster.Position
explosion.Parent = game.Workspace.Rocket.RocketModel.Booster
if
Main.Velocity.y > 100
then
local h = Instance.new("Hint",Workspace) h.Text = "Liftoff."
print("Liftoff")
wait(2)
explosion = Instance.new("Explosion")
explosion.BlastRadius = 50
explosion.BlastPressure = 750
explosion.DestroyJointRadiusPercent = 0
explosion.Position = game.Workspace.Rocket.RocketModel.Booster.Position
explosion.Parent = game.Workspace.Rocket.RocketModel.Booster
else
explosion = Instance.new("Explosion")
explosion.BlastRadius = 50
explosion.BlastPressure = 2500
explosion.DestroyJointRadiusPercent = 0
explosion.Position = game.Workspace.Rocket.RocketModel.Booster.Position
explosion.Parent = game.Workspace.Rocket.RocketModel.Booster
repeat
explosion = Instance.new("Explosion")
explosion.BlastRadius = 50
explosion.BlastPressure = 3000
explosion.DestroyJointRadiusPercent = 0
explosion.Position = game.Workspace.Rocket.RocketModel.Booster.Position
explosion.Parent = game.Workspace.Rocket.RocketModel.Booster
until Main.Velocity.y > 21000
wait(2)
if Main.Velocity.y > 20000
then
wait(5)
if Main.Velocity.y > 19500
then
wait(5)
explosion = Instance.new("Explosion")
explosion.BlastRadius = 50
explosion.BlastPressure = 2500
explosion.DestroyJointRadiusPercent = 0
explosion.Position = game.Workspace.Rocket.RocketModel.Booster.Position
explosion.Parent = game.Workspace.Rocket.RocketModel.Booster
else
explosion = Instance.new("Explosion")
explosion.BlastRadius = 50
explosion.BlastPressure = 4750
explosion.DestroyJointRadiusPercent = 0
explosion.Position = game.Workspace.Rocket.RocketModel.Booster.Position
explosion.Parent = game.Workspace.Rocket.RocketModel.Booster
if Main.Velocity.y < 1
then
local h = Instance.new("Hint",Workspace) h.Text = "Omicron I Launch Failed."
print("Omicron I Launch Failed.")
wait(2)
local h = Instance.new("Hint",Workspace) h.Text = "Please contact Launch Administrators."
print("Please contact Launch Administrators")
wait(2)local h = Instance.new("Hint",Workspace) h.Text = "Omicron I Launch Failed."
print("Omicron I Launch Failed.")
wait(2)
local h = Instance.new("Hint",Workspace) h.Text = "Please contact Launch Administrators."
print("Please contact Launch Administrators")
wait(2)local h = Instance.new("Hint",Workspace) h.Text = "Omicron I Launch Failed."
print("Omicron I Launch Failed.")
wait(2)
local h = Instance.new("Hint",Workspace) h.Text = "Please contact Launch Administrators."
print("Please contact Launch Administrators")
wait(2)local h = Instance.new("Hint",Workspace) h.Text = "Omicron I Launch Failed."
print("Omicron I Launch Failed.")
wait(2)
local h = Instance.new("Hint",Workspace) h.Text = "Please contact Launch Administrators."
print("Please contact Launch Administrators")
wait(2)
local h = Instance.new("Hint",Workspace) h.Text = "Omicron I Launch Failed."
print("Omicron I Launch Failed.")
wait(2)
local h = Instance.new("Hint",Workspace) h.Text = "Please contact Launch Administrators."
print("Please contact Launch Administrators")
wait(2)
print("Catastrophic Failure Imminent. Please Clear the Area.")
local h = Instance.new("Hint",Workspace) h.Text ="Catastrophic Failure Imminent. Please Clear the Area."
wait(2)
print("Systems Failed. Catastrophic Failure Imminent. Please Clear the Area.")
local h = Instance.new("Hint",Workspace) h.Text ="Systems Failed. Catastrophic Failure Imminent. Please Clear the Area."
wait(2)
print("Cooling Systems Failure. Danger Level - Extremely High")
local h = Instance.new("Hint",Workspace) h.Text = "Cooling Systems Failure. Danger Level - Extremely High"
wait(2)
print("Cooling Systems Reboot...")
local h = Instance.new("Hint",Workspace) h.Text = "Cooling Systems Reboot..."
explosion = Instance.new("Explosion")
explosion.BlastRadius = 50
explosion.BlastPressure = 100000
explosion.DestroyJointRadius = 95
explosion.Position = game.Workspace.Rocket.RocketModel.Booster.Position
explosion.Parent = game.Workspace.Rocket.RocketModel.Booster
wait(1)
print("Reboot Failed. Catastrophic Failure Imminent. Please Clear the Area.")
local h = Instance.new("Hint",Workspace) h.Text = "Reboot Failed. Catastrophic Failure Imminent. Please Clear the Area."
wait(2)
explosion = Instance.new("Explosion")
explosion.BlastRadius = 25
explosion.BlastPressure = 5000
explosion.DestroyJointRadius = 95
explosion.Position = game.Workspace.Gantry.Gantrymiddle.Side.Position
explosion.Parent = game.Workspace.Gantry.gantrymiddle.Side
wait(3)
print("Operational Systems Failed. Shutting Down...")
local h = Instance.new("Hint",Workspace) h.Text = "Operational Systems Failed. Shutting Down..."
wait(2)
explosion = Instance.new("Explosion")
explosion.BlastRadius = 125
explosion.BlastPressure = 500000
explosion.DestroyJointRadius = 95
explosion.Position = game.Workspace.Rocket.RocketModel.Middle.Position
explosion.Parent = game.Workspace.Rocket.RocketModel.Middle
wait(1)
explosion = Instance.new("Explosion")
explosion.BlastRadius = 185
explosion.BlastPressure = 7500
explosion.DestroyJointRadius = 95
explosion.Position = game.Workspace.Rocket.RocketModel.Top.Position
explosion.Parent = game.Workspace.Rocket.RocketModel.Head2
wait(5)
end
end
end
end
end)

2 comments
Okay, now it is saying: 23:01:36 -- Workspace.Rocket.Explosion trigger.Script:182: '' exoected near 'end' -I have updated the script shown above to what it is currently in-game as well.
You have an extra end