PlayerGui Error

I made a script to make a frame visible though the output shows that it isn’t a member of the PlayerGui.

image

local Height = script.Parent:WaitForChild("Frame")
local Timer = script.Parent.Parent.Timer:WaitForChild("Timer")
local CandyDisplay = script.Parent.Parent.Display:WaitForChild("CandyDisplay")

Height.Visible = true
Timer.Visible = true
CandyDisplay.Visible = true

The script that the code is inside:

image

Where is this script located at?

The local script inside of height.

try using WaitForChild on Display

local CandyDisplay = script.Parent.Parent:WaitForChild("Display"):WaitForChild("CandyDisplay")
2 Likes

I’ll try but doesn’t really make sense since the timer one works.

well it didn’t have time to load, might want to use WaitForChild for Timer just in case

Alright tested it and it works now thanks for the explanation and solution.