This script checks whether the intermission board in question (which is in the workspace) has stopped looping through the for loop so that I can enable PlayerGUI once it's over. However, I am always hesitant to access assets on the workspace from local script fearing that the script will not work properly or it might intervene with other scripts. Of course the scripts run properly as they should, but is it okay to do that? Here is part of a script:
local PlayerGui = game:GetService("Players") local player = PlayerGui.LocalPlayer local Gui = player:WaitForChild("PlayerGui") local sound = game.Workspace.OtherSounds:GetChildren() wait(3) while true do local players = game.Players:GetPlayers() while workspace.INTERMISSIONTV.INTERMISSION.SurfaceGui.TextLabel.Text ~= "choosing map" do wait(3) end
Although this does work as you said this is not something I'd suggest. This seems as if it would be prone to breaking as you add more to your game.
I'd suggest using remote events. To tell all the clients in game that an Intermission has started. Or that people can now choose maps so you can then display this on a Gui for each client.
If you don't know how to do this look it up! https://developer.roblox.com/en-us/articles/Remote-Functions-and-Events