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: Studio Crashing?

Previous Thread :: Next Thread 
Krosskode is not online. Krosskode
Joined: 26 Aug 2010
Total Posts: 11001
28 Oct 2014 07:43 PM
local sp = script.Parent

local Audio = game.Workspace.Audio

local Event = game.ReplicatedStorage.GameEvent
local Status = game.ServerStorage.Status

local Intermission = false
local Start = false
local Lose = false
local Win = false

Status.Changed:connect(function()
if Status.Value == 0 then
Intermission = true
Start = false
Lose = false
Win = false
if not Start and not Lose and not Win then
Intermission = true
sp.Text = "Intermission"
Audio.Intermission:Play()
end
elseif Status.Value == 1 then
Intermission = false
Start = true
Lose = false
Win = false
Start = true
while true do
if not Intermission and not Lose and not Win then
Audio.Intermission:Stop()
sp.Text = "Starting Game"
Audio.Tick:Play()
wait(1)
if not Intermission and not Lose and not Win then
sp.Text = "Starting Game."
Audio.Tick:Play()
wait(1)
if not Intermission and not Lose and not Win then
sp.Text = "Starting Game. ."
Audio.Tick:Play()
wait(1)
if not Intermission and not Lose and not Win then
sp.Text = "Starting Game. . ."
Audio.Tick:Play()
wait(1)
if not Intermission and not Lose and not Win then
elseif Intermission == true then
break
end
end

elseif Status.Value == 2 then
Intermission = false
Start = false
Lose = true
Win = false
if not Intermission and not Start and not Win then
Lose = true
sp.Text = "The contestant has lost!"
Audio.SadTrombone:Play()
Intermission = true
end

elseif Status.Value == 3 then
Intermission = false
Start = false
Lose = false
Win = true
if not Intermission and not Start and not Lose then
Win = true
sp.Text = "The contestant has answered correctly!"
Audio.Cheer:Play()
end
end

end
end
end
end
end)

How would I make this stop crashing?
Report Abuse
gooey333 is not online. gooey333
Joined: 24 Mar 2013
Total Posts: 1208
29 Oct 2014 12:20 AM
Usually studio crashes on me when i use "while true do" incorrectly.

Make sure your waiting inside your "while true do". I only skimmed it but it has only ever crashed on me because of that.
Report Abuse
ScriptingIlluminati is not online. ScriptingIlluminati
Joined: 27 Oct 2014
Total Posts: 25
29 Oct 2014 12:23 AM
else if doesnt have a wait()
Report Abuse
Krosskode is not online. Krosskode
Joined: 26 Aug 2010
Total Posts: 11001
29 Oct 2014 04:26 PM
I added them, and it still crashed.
Report Abuse
ScriptingIlluminati is not online. ScriptingIlluminati
Joined: 27 Oct 2014
Total Posts: 25
29 Oct 2014 07:38 PM
is there anything codes underlined in any colours?
Report Abuse
Krosskode is not online. Krosskode
Joined: 26 Aug 2010
Total Posts: 11001
29 Oct 2014 09:15 PM
@Script

I know, I know how to script, and I got it fixed, but thanks.
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