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: Only works once?

Previous Thread :: Next Thread 
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
11 Sep 2011 09:30 AM
So i want the script to continiou and continiou but it stops after the first time.
Could someon help me?

msg = Instance.new("Message", game.Workspace)
text = {"Chikkenpie", "No pie, haha", "Doompie", "Right", "Wrong", "Why so much?"}
for i = 1, 1 do
msg.Text = text[math.random(1, #text)]
wait(1)
msg.Text = ""
end
if msg.Text == "" then
wait(1)
msg.Text = text[math.random(1, #text)]
end
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
11 Sep 2011 09:34 AM
"for i = 1, 1 do"

What did you expect? change the second 1 to however many times you want it to go.
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
11 Sep 2011 09:34 AM
Oh ok sorry didn't notice :3

~This makes absolutely no sense
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
11 Sep 2011 09:35 AM
Then the message doesn't get removed...

~This makes absolutely no sense
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
11 Sep 2011 09:36 AM
Ok not the message but the text

~This makes absolutely no sense
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
11 Sep 2011 09:38 AM
Sry forget to give what happens so it gives a message then no text then a message and the message stays...

~This makes absolutely no sense
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
11 Sep 2011 09:56 AM
msg = Instance.new("Message", game.Workspace)
text = {"Chikkenpie", "No pie, haha", "Doompie", "Right", "Wrong", "Why so much?"}
for i = 1, 1 do
msg.Text = text[math.random(1, #text)]
wait(1) -- this line seems to break after the first time...
msg.Text = ""
end

if msg.Text == "" then
wait(1)
msg.Text = text[math.random(1, #text)]
end

~This makes absolutely no sense
Report Abuse
Cachinnation is not online. Cachinnation
Joined: 21 Aug 2011
Total Posts: 1797
11 Sep 2011 10:01 AM
msg = Instance.new("Message", game.Workspace)
text = {"Chikkenpie", "No pie, haha", "Doompie", "Right", "Wrong", "Why so much?"}
msg.Text = text[math.random(#text)]
wait(1) -- this line seems to break after the first time...
msg.Text = ""
if msg.Text == "" then
wait(1)
msg.Text = text[math.random(#text)]
end

Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
11 Sep 2011 10:04 AM
Breaks at the same moment...

~This makes absolutely no sense
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
11 Sep 2011 10:14 AM
Help me please :O

~This makes absolutely no sense
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
11 Sep 2011 11:08 AM
Come on please people :O
btw thx to the ones that already posted something

~This makes absolutely no sense
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
11 Sep 2011 11:10 AM
msg = Instance.new("Message", game.Workspace)
text = {"Chikkenpie", "No pie, haha", "Doompie", "Right", "Wrong", "Why so much?"}
for i = 1, 2 do
msg.Text = text[math.random(1, #text)]
wait(1)
msg.Text = ""
wait(1)
end
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
11 Sep 2011 11:13 AM
Hmmm... k thx that works but i'm going to take while wait() do.

~This makes absolutely no sense
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
11 Sep 2011 11:14 AM
You dont do anything with
while wait() do..
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
11 Sep 2011 11:16 AM
Oh yes you do test it Hmmm...

~This makes absolutely no sense
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
11 Sep 2011 11:16 AM
msg = Instance.new("Message", game.Workspace)
text = {"Chikkenpie", "No pie, haha", "Doompie", "Right", "Wrong", "Why so much?"}
while wait() do
msg.Text = text[math.random(1, #text)]
wait(1)
msg.Text = ""
wait(1)
end

~This makes absolutely no sense
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