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

I am making a screen GUI that will open other GUI's but its not working. Help?

Asked by 4 years ago
script.Parent.MouseButton1Click:Connect(function()
 if game.StarterGui.Store1.Enabled then
    game.StarterGui.Store1.Enabled = false
    script.Parent.Text = "Close GUI"
 else
   if not game.StarterGui.Store1.Enabled then
    game.StarterGui.Store1.Enabled = true
    script.Parent.Text = "Open GUI"
 end
end
end)

script.Parent.MouseButton1Click:Connect(function()
 if game.StarterGui.Store2.Enabled then
    game.StarterGui.Store2.Enabled = false
 else
   if not game.StarterGui.Store1.Enabled then
    game.StarterGui.Store2.Enabled = true
 end
end
end)

script.Parent.MouseButton1Click:Connect(function()
 if game.StarterGui.Store3.Enabled then
    game.StarterGui.Store3.Enabled = false
 else
   if not game.StarterGui.Store1.Enabled then
    game.StarterGui.Store3.Enabled = true
 end
end
end)

0
PlayerGui, not StarterGui. You can access it via game.Players.LocalPlayer Ziffixture 6913 — 4y
0
You can put that as an answer and I can accept it if you want. :D Nistrict 44 — 4y
0
a simpler way of doing it is - Store1.Enabled = not Store1.Enabled - etc. youtubemasterWOW 2741 — 4y

Answer this question