Need to change frame when clicking ImageButton

I need the shopUI to become visible when clicking the shop button logo, but it doesn’t seem to work any ideas why? (not a scripter)

The LocalScript that is inside of the ImageButton:

script.Parent.MouseButton1Click:Connect(function() game.StarterGui.ScreenGui.ShopUI.Visible = true end)

image

1 Like

You are setting the gui in StarterGui to visible, StarterGui is where all the guis are cloned to players from when they join the game, changing anything there wont change stuff on your screen. To properly change the guis you need to reference PlayerGui by doing: game.Players.LocalPlayer.PlayerGui, however you can just get to the shop ui by doing: script.Parent.Parent.Parent.ShopUI.

1 Like

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