Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My close gui script isnt working and theres no errors?

Asked by 4 years ago
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

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. AntiWorldliness 868 — 4y

1 answer

Log in to vote
0
Answered by
hokyboy 270 Moderation Voter
4 years ago

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)
0
Ah thanks jerichobuddy 2 — 4y
Ad

Answer this question