I want this gui to show for all players, for some reason it is only showing on one players screen. My guess is that it is something to do with the variables being reassigned before the script has a chance to run through or something like that?
**UPDATED SCRIPT THANKS TO HELP FROM chararray256 **
01 | function mem(v) |
02 | print ( 1 ) |
03 | coroutine.wrap( function () |
04 | print ( 2 ) |
05 | repeat wait() print ( "waiting" ) until v:FindFirstChild( "PlayerGui" ) |
06 | gui = v:FindFirstChild( "PlayerGui" ).Loading.d |
07 | print ( 3 ) |
08 | wait() |
09 | gui.Image = "http://www.roblox.com/asset/?id=154661376" |
10 | gui.Visible = true |
11 | print ( 4 ) |
12 | for i = 1 , 10 do |
13 | for a,b in pairs (introGuis) do |
14 | print ( "try" ) |
15 | gui.Image = "http://www.roblox.com/asset/?id=" .. b |
Try this:
01 | function GiveGui(v) |
02 | print ( 1 ) |
03 | coroutine.wrap( function () |
04 | print ( 2 ) |
05 | repeat wait() print ( "waiting" ) until v:FindFirstChild( "PlayerGui" ) |
06 | gui = v:FindFirstChild( "PlayerGui" ).Loading.d |
07 | print ( 3 ) |
08 | wait() |
09 | gui.Image = "http://www.roblox.com/asset/?id=154661376" |
10 | gui.Visible = true |
11 | print ( 4 ) |
12 | for i = 1 , 10 do |
13 | for a,b in pairs (introGuis) do |
14 | print ( "try" ) |
15 | gui.Image = "http://www.roblox.com/asset/?id=" .. b |
Your script didn't work because it was ran only once, when the server was started.
I read somewhere that "if it's placed in a PlayerGui then it will display to one person but if it's placed in workspace then it will display to everyone