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

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

Asked by 10 years ago

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?

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. BlueTaslem 18071 — 10y
0
Which line of that script is the error occurring on? Merely 2122 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago

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.

Ad

Answer this question