(solved) Roblox Studio Bug with GUI not showing based on visible tag

I’ve tried relaunching roblox studio many times but in game for some reason the UI doesn’t abide by the visible tag


image

ui = game.StarterGui.Shop.Frame

script.Parent.Triggered:Connect(function()
	ui.Visible = not ui.Visible
	print(ui.Visible)
end)

If anyone has any fixes for this or has experience this aswell please comment. Thank you

You are changing the Startergui’s guis properties.you should change the players playergui guis instead of startergui.Here’s an updated version:

Prompt = script.Parent

Prompt.Triggered:Connect(function(Plr)
    Plr.Shop.Frame.Visible = not Plr.Shop.Frame.Visible
	print(Plr.Shop.Frame.Visible)
end)

If you encounter a bug please contact me again!

It says that shop doesn’t exist, even though i looked at the player gui stuff and shop does exist

I’m just an stupid i forgot to add the PlayerGui thing.Here’s updated version :sob:

Prompt = script.Parent

Prompt.Triggered:Connect(function(Plr)
    Plr.PlayerGui.Shop.Frame.Visible = not Plr.PlayerGui.Shop.Frame.Visible
	print(Plr.Shop.Frame.Visible)
end

I’ll be mad right now :slight_smile: i should sleep early so i can regain my brain :smiley:

Prompt = script.Parent

Prompt.Triggered:Connect(function(Plr)
    Plr.PlayerGui.Shop.Frame.Visible = not Plr.PlayerGui.Shop.Frame.Visible
	print(Plr.PlayerGui.Shop.Frame.Visible)
end

Thanks it works. I had no clue you had to access it from the player. and I already changed everything to playergui before you sent the new one. Thanks alot!

Have a good day again No problem :smiley:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.