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
|
  |
| 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 |
|
|
|
| 29 Oct 2014 12:23 AM |
| else if doesnt have a wait() |
|
|
| Report Abuse |
|
|
Krosskode
|
  |
| Joined: 26 Aug 2010 |
| Total Posts: 11001 |
|
|
| 29 Oct 2014 04:26 PM |
| I added them, and it still crashed. |
|
|
| Report Abuse |
|
|
|
| 29 Oct 2014 07:38 PM |
| is there anything codes underlined in any colours? |
|
|
| Report Abuse |
|
|
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 |
|
|