I am trying to index a ScreenGUI, but I want to wait for the player's PlayerGui and The ScreenGUI to load in, so I've set it as a variable. Here is my code:
local Player = game.Players.LocalPlayer local GUI = Player:WaitForChild("PlayerGui", 1):WaitForChild("SpecificScreenGUI", 2)
Here is my error:
Players.Zyrun.PlayerScripts.LocalScript:31: attempt to index local 'SpecificScreenGUI' (a nil value)
Here is the Hierarchy of the GUIs:
game/Players/Zyrun/PlayerGui/SpecificScreenGUI
Any help or insight would be great, thanks in advance!