Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Info GUI for every players in the game. ???

Well i tried to make every players in my game see a GUI with a script but only 1 player see it (The others just hear the sounds made by it)

I tried everything ( I even searched on the ROBLOX wiki)

script.Intermission:Play()

for s,Dudes in pairs(game.Players:GetPlayers()) do
	for Time = 25, 5, -1 do
	Dudes.PlayerGui.Infos.Info1.Visible = true
	Dudes.PlayerGui.Infos.Info1.Active = true
	Dudes.PlayerGui.Infos.Info1.Text = "Starting game in "..Time.." seconds"
	script.Sound:Play()
	wait (1)
	   end	

script.CountdownQ:Play()

Thanks for helping me

``

2 answers

✓ Accepted answer

You need to add another end for the second loop.

But, first you should put the two loops into a function, example:

script.Intermission:Play()
function Intermission()
for s,Dudes in pairs(game.Players:GetPlayers()) do
    for Time = 25, 5, -1 do
    Dudes.PlayerGui.Infos.Info1.Visible = true
    Dudes.PlayerGui.Infos.Info1.Active = true
    Dudes.PlayerGui.Infos.Info1.Text = "Starting game in "..Time.." seconds"
    script.Sound:Play()
    wait (1)
end--Added end.
end--Another added end!
end  
Intermission()--Change this.
script.CountdownQ:Play()

This should work, or help you. If it does, then accept my answer, it gives us both rep!

7 comments

0

Didn't work either D:

0

Try again, you needed two more ends, not one. And could you accept my answer?

0

Thanks now it works ! :D

0

No problem mate.

0

Nvm doesn't work..

0

Any errors?

0

No, still only one player see it.

for Time = 25, 5, -1 do

this code will not play for each player at the same time, it play the code for 1 player at a time so if your intermission is 25 seconds, every 25 seconds, 1 player would see this.

so,

set the visible and active properties to true in the first loop

next loop go tru all the players and set the new value and have the loop go 25 times

sorry i could not give code

2 comments

0

Did not work ( I think i didn't do it correctly) so i'm just gonna use hints until i understand. Thanks for your answer :)

0

your gonna need 2 loops first makes it visible 2and one counts down

This discussion is preserved as it was. New answers, comments, and votes are closed.