I have a ScreenGui named 'PlayerGui' and inside the gui, there is a Frame.
In a localscript under a different ScreenGui I want to hide the 'Frame' inside PlayerGui.
My script:
script.Parent.Parent.PlayerGui.Frame.Visible = false
This script doesn't work, and roblox outputs with this message: "PlayerGui is not a valid member of PlayerGui"
I tried another script:
game.StarterGui.PlayerGui.Frame.Visible = false
This script also doesn't work, and outputs with the same message.
I have double checked everything and can 100% guarantee that everything is under StarterGui and its ScreenGui.
How do I fix this problem?

5 comments
Btw I just checked the visibility under Frame and it checked visible but Im not sure why it's not visible when it's checked visible
Srry if the names r a little bit confusing
did you try putting it into a serverscript and using the 2nd piece of code you put?
The problem is that the script is working, and the visible box is checked in 'Frame' but the actual thing is not showing, and I don't have any other code stopping it from not showing
I even added a print("visible") and it printed "visible" but the frame is not showing! Is this a roblox studio bug or something?