Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is this a glitch?

Asked by 9 years ago
menu = script.Parent.Parent.Parent.Parent.ScreenGui6

The error says this: ScreenGui6 is not a valid member of PlayerGui I've checked and there is a ScreenGui named "ScreenGui6" and it's parent is PlayerGui Help is needed.

1
'ScreenGui6' may not have been existant at the time when the code executed, consider using the 'WaitForChild' method? [Parent:WaitForChild(Child)]. Also, that error usually means that the Child, in this case 'ScreenGui6', isn't existant in the Parent, or not existant at the time of the code executing. TheeDeathCaster 2368 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

Use WaitForChild like so:

menu = script.Parent.Parent.Parent.Parent:WaitForChild("ScreenGui6")

This will ensure that ScreenGui6 has cloned in.

0
Thanks! Senor_Chung 210 — 9y
Ad

Answer this question