Hi. The script I have to make a ScreenGui visible to everyone in the server does not work. What is wrong with it?
Thanks!
local beginning = game.StarterGui.ScreenGui.beginning
beginning.Visible=true
wait(20)
beginning.Visible=false
Hi. The script I have to make a ScreenGui visible to everyone in the server does not work. What is wrong with it?
Thanks!
local beginning = game.StarterGui.ScreenGui.beginning
beginning.Visible=true
wait(20)
beginning.Visible=false
What you did was make it so in starterGUI it is either visible or invisible.
To update what a player sees, you must access their "PlayerGui".
To make it visible to everyone, do this:
for k, p in pairs(game.Players:GetPlayers()) do
local beginning = p.PlayerGui.ScreenGui.beginning
beginning.Visible=true
wait(20)
beginning.Visible=false
end
Basically this gets all the players, then goes into their PlayerGui and makes it visible/invisble
This discussion is preserved as it was. New answers, comments, and votes are closed.
6 comments
Thanks so much!
One concern- it only works in Studio. Any fix?
No problem! Glad to help and let me check
Go in game and test it, and press F9 and check the server console, and comment what it says.
No errors as far as I can see.. but it does work in studio, so.. hmm..
Use the new http api: no 15:52:26.315 - DataModel Loading http://www.roblox.com/asset/?id=218755429 15:52:26.975 - Auto-Saving... Leaderboard script version 3.00 loaded 15:52:27.766 - Touched is not a valid member of Workspace 15:52:27.766 - Script 'Workspace.Script', Line 12 15:52:27.766 - Stack End 15:52:27.767 - Workspace.Script:7: function arguments expected near '=' 15:52:27.767 - Workspace.b