This is my following GUI structure:
- Shop
- Minimized (BoolValue)
- Loop (LocalScript)
- Bar (Frame)
- Container
- ImageButton
- TextLabel
- Container
- 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
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.
Here, : http://pastebin.com/raw.php?i=txgwrfrm
Which line of that script is the error occurring on?