Script below is inside a chracter from workspace to open the gui from the player
local Clicker = script.Parent:WaitForChild("Clicker") local TeamAllowed = { ["Woo"] = true, } Clicker.ClickDetector.MouseClick:Connect(function(plr) if TeamAllowed[plr.Team.Name] then plr.PlayerGui.TeamShopTESTING.Main.Visible = true print("Working!!") end end)
I click on it and the gui pops up after i close it by turning the frame Visible = false with a localscript from the Exit part of the gui, The Detector doesn't work again and i can't open the gui. I want to be able to open the gui again na inf amount of times but it just doesn't work.
I'm fairly new to scripting and i need some help.
When the localscript turns the frame Visible to false, it turns it false only on the client's side. The server however, thinks Visible is still true. When you click again, the server sees that Visible is already true so it does not do anything. I might be wrong tho