Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is this a glitch?

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 comment

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.

1 answer

✓ Accepted answer

Use WaitForChild like so:

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

This will ensure that ScreenGui6 has cloned in.

1 comment

0

Thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.