Can't get children in PlayerGui

I have been constantly trying to access my PlayerGui’s but I kept just getting stuff like PlayerGui doesn’t exist because it keeps giving me "Attempt to index nil with ‘FindFirstChild’ even though if I look into Player Service and Player Gui and it’s clearly there.

And WaitForChild just gives me infinite yields on finding the PlayerGui or the Folder that I want to get within PlayerGui.

And Yes. This is in a local script.

local playerService = game:GetService("Players")

local getPlayerGui = playerService:FindFirstChild("PlayerGui")
local getFolderGui = getPlayerGui:WaitForChild("LockGui")

PlayerGui is a child of the Player Instance.

local playerService = game:GetService("Players")

local getPlayerGui = playerService.LocalPlayer:FindFirstChild("PlayerGui")
local getFolderGui = getPlayerGui:WaitForChild("LockGui")
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.