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

Previous Thread :: Next Thread 
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
10 Nov 2012 03:31 PM
Why does this crash my game? I have listed the two scripts that are in my game.

***Script 1:***

ChatNew = script:FindFirstChild("0").Value
Chat1 = script:FindFirstChild("1").Value
Chat2 = script:FindFirstChild("2").Value
Chat3 = script:FindFirstChild("3").Value
Chat4 = script:FindFirstChild("4").Value
Chat5 = script:FindFirstChild("5").Value

game.Workspace.Chat.System.Changed:connect(function()
ChatNew = "System: "..script.System.Value
wait()
if Chat1 == "" then
Chat1 = ChatNew
ChatNew = ""
elseif Chat1 ~= "" and Chat2 == "" then
Chat2 = ChatNew
ChatNew = ""
elseif Chat1 ~= "" and Chat2 ~= "" and Chat3 == "" then
Chat3 = ChatNew
ChatNew = ""
elseif Chat1 ~= "" and Chat2 ~= "" and Chat3 ~= "" and Chat4 == "" then
Chat4 = ChatNew
ChatNew = ""
elseif Chat1 ~= "" and Chat2 ~= "" and Chat3 ~= "" and Chat4 ~= "" and Chat5 == "" then
Chat5 = ChatNew
ChatNew = ""
elseif Chat1 ~= "" and Chat2 ~= "" and Chat3 ~= "" and Chat4 ~= "" and Chat5 ~= "" then
Chat1 = Chat2
Chat2 = Chat3
Chat3 = Chat4
Chat4 = Chat5
Chat5 = ChatNew
ChatNew = ""
end
local c = game.Players:GetChildren()
for i = 1, #c do
wait()
c[i].PlayerGui.Chat.Small.Window:FindFirstChild("1").Text = Chat1
c[i].PlayerGui.Chat.Small.Window:FindFirstChild("2").Text = Chat2
c[i].PlayerGui.Chat.Small.Window:FindFirstChild("3").Text = Chat3
c[i].PlayerGui.Chat.Small.Window:FindFirstChild("4").Text = Chat4
c[i].PlayerGui.Chat.Small.Window:FindFirstChild("5").Text = Chat5
end
end)





***Script 2:***

while true do
for i = 1, 3 do
wait(1)
text = "Game starting in "..i.." seconds."
game.Workspace.Chat.System.Value = text
end
end
Report Abuse
blackboy167thst is not online. blackboy167thst
Joined: 22 Jul 2011
Total Posts: 2468
10 Nov 2012 03:32 PM
Script #2 crashes your game.
Report Abuse
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
10 Nov 2012 03:35 PM
OK, But why?
Report Abuse
Monkey727 is not online. Monkey727
Joined: 12 Jan 2009
Total Posts: 969
10 Nov 2012 03:40 PM
You need a wait inside the while loop, (But outside for loop too).

while true do
for i = 1, 3 do
wait(1)
text = "Game starting in "..i.." seconds."
game.Workspace.Chat.System.Value = text
end
wait()
end
Report Abuse
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
10 Nov 2012 03:49 PM
I changed the second script to what you said to use, but it still crashes.
Report Abuse
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
10 Nov 2012 04:16 PM
Anybody know why its not working? That does not seem to be the problem.
Report Abuse
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
10 Nov 2012 04:30 PM
Tried changing the second script to just this, still crashed.

for i = 100, 0, -1 do
        wait(1)
        text = "Game starting in "..i.." seconds."
        game.Workspace.Chat.System.Value = text
end
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