local shop = game.Players.LocalPlayer.PlayerGui.Shop.Frame local button = game.Players.LocalPlayer.PlayerGui.Shop.TextButton function close() shop.visible = false button.visible = true script.Parent.MouseButton1Click:Connect(close) end
idk whats wrong
U Used the event in the function I fixed ur code for u
local shop = game.Players.LocalPlayer.PlayerGui.Shop.Frame local button = game.Players.LocalPlayer.PlayerGui.Shop.TextButton function close() shop.visible = false button.visible = true end script.Parent.MouseButton1Click:Connect(close)