So I have this script, Where if you are in a certain group you can join the team, Using a GUI, but I was wondering, How can I make it if when no one is on said team, So they left the game or changed teams the team deletes? This is my team change script below.
local plr = game.Players.LocalPlayer
local group = 000000
script.Parent.MouseButton1Down:Connect(function()
if plr:IsInGroup(group) then
local newTeam = Instance.new("Team",game.Teams);
plr.Team = newTeam;
end
end)
Thanks!
