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 » Scripters
Home Search
 

Re: for loop inside in pairs loop

Previous Thread :: Next Thread 
MrKrystianoPL is not online. MrKrystianoPL
Joined: 04 Jun 2013
Total Posts: 251
11 Feb 2015 04:39 AM
Sorry for so much threads but im not god at scripting

I was making Warn gui for admins. this shows up on all players screens i decided to add animations for this to look better. One problem is that it not shows to all players at one time cause of loop inside the loop... ;-; ehh just see the code its kinda hard to explain

heres the code:

wait(1)
ErrorSound = script.Parent.Parent.Parent.Parent.Parent.ErrorBeep

script.Parent.MouseButton1Click:connect(function()
if script.Parent.Message.Text == "" then
ErrorSound:Play()
script.Parent.Text = "Write a message!"
wait(1)
script.Parent.Text = "Warn"
else
for i,v in pairs (game.Players:GetPlayers()) do
v.PlayerGui.Warn.TextLabel.Text = script.Parent.Message.Text
for i= 1, 0, -0.1 do
v.PlayerGui.Warn.TextLabel.TextTransparency = i
wait(0.1)
end
wait(10)
for i= 0, 1, 0.1 do
v.PlayerGui.Warn.TextLabel.TextTransparency = i
wait(0.1)
end
end
end
end)
Report Abuse
MrKrystianoPL is not online. MrKrystianoPL
Joined: 04 Jun 2013
Total Posts: 251
11 Feb 2015 05:15 AM
Bunp
Report Abuse
drager980 is online. drager980
Joined: 25 May 2009
Total Posts: 13385
11 Feb 2015 05:20 AM
your English is almost as bad as mine o3o
anyways, if you wanna do something in a script at the same(ish) time as something else use a coroutine
wiki is your friend for that, though.
Report Abuse
MrKrystianoPL is not online. MrKrystianoPL
Joined: 04 Jun 2013
Total Posts: 251
11 Feb 2015 07:42 AM
Oh thanks.
English isn,t my main lang. Thats why its bad
Report Abuse
MrKrystianoPL is not online. MrKrystianoPL
Joined: 04 Jun 2013
Total Posts: 251
11 Feb 2015 07:43 AM
Oh demn I used "," instead of "'" ...ok nvm
Report Abuse
parkiet3 is not online. parkiet3
Joined: 16 Jul 2011
Total Posts: 832
11 Feb 2015 07:46 AM
Suddenly yore doing wait(10) wich will again make it last 10 seconds longer to go to the next player, so just add a coroutine
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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