its a Jojo's poses type game. like an add-on for yt videos. im not the best at Lua so tell me what I've done wrong cuz the script isn't working. here's the script:
local CloseButton = game.StarterGui.CloseGui.Closebutton if CloseButton mouseButton.clicked1 then game.StarterGui.MainGui Visible = 0 end
local CloseButton = game.StarterGui.CloseGui.Closebutton CloseButton.MouseButton1Click:connect(function() (path to the GUI, example: script.Parent.Parent).Visible = False
This is mine if you wanna change it up
script.Parent.MouseButton1Click:connect(function() script.Parent.Parent.Visible = false end)
this basically just closes the gui it is in
local CloseButton = game.StarterGui.CloseGui.Closebutton CloseButton.MouseButtonClick:Connect(function() game.StarterGui.MainGui.Visible = false end
MouseButton.Clicked1 does not exist as a function nor an event and don't use then after a MouseButton detection event, do
CloseButton.MouseButton1Click:Connect(function() --Code here....
, not
if CloseButton mouseButton.clicked1 then --Code here, but its the wrong usage
and Visible is a property of a GUI, and its a BoolValue(it has 2 states, true or false) it is not an integer to determine which it is