My script opens the gui, but it doesnt close it, can someone fix it?
wait(1) local Active = game.Players.LocalPlayer.PlayerGui.ScrollingGui.Enabled script.Parent.MouseButton1Click:connect(function() if Active == false then game.Players.LocalPlayer.PlayerGui.ScrollingGui.Enabled = true end if Active == true then game.Players.LocalPlayer.PlayerGui.ScrollingGui.Enabled = false end end)
you can not try to get a value in a variable, I recommend putting the Enabled after Active, you can use this script:
wait(1) local Active = game.Players.LocalPlayer.PlayerGui.ScrollingGui script.Parent.MouseButton1Click:Connect(function() if Active.Enabled == false then game.Players.LocalPlayer.PlayerGui.ScrollingGui.Enabled = true else game.Players.LocalPlayer.PlayerGui.ScrollingGui.Enabled = false end end)