I’ve been trying to make a button to open up a gui and make a frame visible, However it doesn’t seem to work? I’ve tried changing the function, I tried using elseif. It doesn’t seem to work
I’m fairly new to scripting, I haven’t got some of it perfected yet but I’m working on it, Heres the script I’ve been working on :
button.MouseButton1Click:Connect(function()
if game:GetService("StarterGui").Index.IndexMenu.Visible == false then
game:GetService("StarterGui").Index.IndexMenu.Visible = true
game:GetService("StarterGui").Index.Text.Visible = true
elseif game:GetService("StarterGui").Index.IndexMenu.Visible == true then
game:GetService("StarterGui").Index.IndexMenu.Visible = false
game:GetService("StarterGui").Index.Text.Visible = false
end
end)