What do you want to achieve? Keep it simple and clear!
I want the local script to change and manipulate the gui instances in PlayerGui, but even though the client sees it in the output bar, I don’t see it.
What is the issue? Include screenshots / videos if possible!
So as the title says, I have a local script that does something like:
local screen_gui = script.Parent
local container = screen_gui:FindFirstChild("container")
container.frame.Visible = true
print(container.frame.Visible)
In the output, it prints “true” but I don’t see any changes, even when it’s inside PlayerGui (not startergui)
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve tried adding a “task.wait()” at the 1st line of the script, before all variables.
I also dont know why script.Parent.Container.frame.Visible = true does the trick?
Is there an issue with my variables? I have checked the paths already.
just as @HugeCoolboy2007 said, the issue appends because you have set the name of an instance to a variable, to fix this you need to rename the container.frame.Visible ← instance into something with either a lowercase or just another name
is it also a typo because in the script I can see that it says: Findfirstchild("container") but I think it should be FindFirstChild("Container") as I can see its name from the screenshot
okay so as I understand you are trying to make a frame invisible right?
Well right away today you are going to learn something new, so the Visible value of a GuiInstance2d represents if its visible or not, settings frame.Visible = true would cause the frame to be visible, setting it to false like here: frame.Visible = false would cause it to go invisible,
so here is your fix: local screen_gui = script.Parent local container = screen_gui:WaitForChild("Container") container.frame.Visible = false print(container.frame.Visible)
I fixed the typos and added WaitForChild to prevent a nil variable which can be caused if the players client loads to slow
ohhhh I understand it now, there are many possible causes for that, therefore check if the Screengui where the frame is located in has its enabled value set to true, also check if you can even see the frame by setting its visibilty manually
Okay I see, there is no instance named frame inside the Container frame, so here is the fix: local frame = script.Parent.Container frame.Visible = true print(frame.Visible) --output what the localscript sees (should be "true")
The mistake you did was, you where trying to set a instance with the name of frame (which I cant see inside the screenshot) to visible, whilst it isnt even there, which is why nothing happens so you need to change it to Container instead of frame