Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

My close gui script isnt working and theres no errors?

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

1 comment

0

You're having the event within the function which it is calling. Just have your text on line 7 after the end. Also capitalize the V in Visible. Capitalization matters most of the time.

1 answer

✓ Accepted answer

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)

1 comment

0

Ah thanks

This discussion is preserved as it was. New answers, comments, and votes are closed.