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

What am I doing wrong (Frame is not a valid member of ScreenGui)?

This is my following GUI structure:

  • Shop
  • Minimized (BoolValue)
  • Loop (LocalScript)
  • Bar (Frame)
    • Container
      • ImageButton
    • TextLabel
  • ShopButton(TextButton)
    • ButtonFunction (LocalScript inside the button)

In my script, I'm referencing Bar and Minimized, as, respectively:

local container = script.Parent.Bar <- Loop script

local bValue = script.Parent.Parent.Parent.Parent.Minimized <- Script inside of ImageButton

What am I doing wrong?

3 comments

1

Can you post your full script, and make sure which script is causing the error and which line? What you have posted would not cause that error.

0

Which line of that script is the error occurring on?

1 answer

✓ Accepted answer

You did one to many Parents in bValue... The syntax is correct, but the actual validation is incorrect cause you have one to many Parents so now they're looking in StarterGui for something that doesn't exist.

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