I am creating a system which displays your achievements in game with a scrolling frame. It works by simply clicking an imagebutton and it opening the gui. All is well and good, no errors however testing it isn't the greatest so far.
I noticed that when I click the imagebutton the gui does not open. I had a look at the frame for the gui and it told me it was visible in properties? I can't see anything! I can open it in studio using properties but not in game when I click the imagebutton.
Anyway, here is my script:
local gui = game.StarterGui.Achievements.ScrollingFrame
script.Parent.MouseButton1Up:Connect(function()
if gui.Visible == false then
gui.Visible = true
else
gui.Visible = false
end
end)

6 comments
Are there any errors in the output? Also would recomend enabling/disabling the ScreenGui (Achievements) than hiding the ScrollingFrame
There are no errors. I will also have a look at enabling/disabling.
Enabling/Disabling doesn't appear to change anything apart from what is expected the enable property. However still does not show the gui.
And where is the script? Also, is it a local or a server script?
The script is a local script in the imagebutton which is in a menu gui.
its beause you were trying to change the startergui itself. change the playergui instead, read @MarkedTomato's answer for more description