ScreenGui is not a valid member of PlayerGui "Players.KenzieLucyIcey.PlayerGui"

Okay, this is getting pretty annoying.
I don’t know how to explain the problem, but the error says:

The PlayerGui and StarterGui:

StarterGui:
image

PlayerGui:
image

The script:

Is this a bug or something?

2 Likes

Use WaitForChild() to ensure every value loads in.

local plr = game.Players.LocalPlayer
local plrUI = plr:WaitForChild("PlayerGui")
local screenUI = plrUI:WaitForChild("ScreenGui")

local text1 = screenUI:WaitForChild("KaitoKid")
local text2 = screenUI:WaitForChild("Text")

Alternatively, cloning the UI at runtime ensures everything loads.

If this does not work, you’re likely working from the server. Use a client script to access UI primarily.

4 Likes