Like if the player leaves the group it will get updated because I want to make a local script inside the starter gui and I don’t want a demoted player access the GUI.
inside of local script
while true do
wait(3)
GUI.Frame.EmployeeTeam.Visible = Player:IsInGroup(Employee)
GUI.Frame.ManagerTeam.Visible = Player:IsInGroup(Manager)
-- So I don’t need to make a elseif statement over and over
end
local player = game.Players.LocalPlayer
local groups = {}
local check
function check(plr)
task.wait()
for i,v in pairs(groups) do
if plr:IsInGroup(v) then
print("Init")
else
print("NotInGroup")
GuiUpdate()
check(plr)
end
end
end
check(player)