Hi,
This “close” button isn’t working. Any help, please?
local openbutton = script.Parent
local Gui = game.StarterGui.Shop
openbutton.MouseButton1Click:Connect(function()
Gui.Enabled = not Gui.Enabled;
end)
Hi,
This “close” button isn’t working. Any help, please?
local openbutton = script.Parent
local Gui = game.StarterGui.Shop
openbutton.MouseButton1Click:Connect(function()
Gui.Enabled = not Gui.Enabled;
end)
You need to call the PlayerGui not starterGui.
Replace this with
game.Players.LocalPlayer.PlayerGui.Shop
Ah, works! thank you so much!!!
No problem.
Common mistake when calling GUIs from the player.
Have a great day!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.