This is supposed to change the GUI in a couple seconds but it's not working.
1 | wait( 5 ) |
2 |
3 | game.workspace.StarterGui.GUI 1. Visible = false |
4 |
5 | game.Workspace.StarterGui.GUI 2. Visible = true |
.
StarterGui is not a child of workspace and changing the StarterGui would not change anything for anyone until they respawn. GUI elements must also be placed within a ScreenGui object. In order to change GUIs on-screen instantly, you must do this through a LocalScript, you'd have to place it in the StarterGui and set the code as:
1 | wait( 5 ) |
2 | player = game.Players.LocalPlayer |
3 |
4 | player.PlayerGui.ScreenGui.GUI 1. Visible = false |
5 | player.PlayerGui.ScreenGui.GUI 2. Visible = true |
That would change the the visibility of the GUIs for the current player after 5 seconds. If you want to change the visibility for everyone at the same time you would place this code within in a script in Workspace:
1 | wait( 5 ) |
2 | for i, v in pairs (game.Players:GetChildren()) do |
3 | v.PlayerGui.ScreenGui.GUI 1. Visible = false |
4 | v.PlayerGui.ScreenGui.GUI 2. Visible = true |
5 | wait() |
6 | end |
Please send me a PM on Roblox if you need further help.
So players don't have StarterGuis they have PlayerGuis That being said, you can get to it by putting a LOCALSCRIPT inside the StarterGui, and get the player by doing script.parent.parent
Workspace doesn't have StarterGui in it, but game does.
I don't think the screenGui has a Visible property, the FRAME does.
So the improved script would be
make sure this is in a localscript in StarterGui
1 | player = script.Parent.Parent |
2 |
3 | wait( 5 ) |
4 | player.PlayerGui.GUI 1. Frame.Visible = false |
5 | player.PlayerGui.GUI 2. Frame.Visible = true |
I hope this helps