By A team on click I mean if you are in a certain group and click a TextButton it creates a team and assigns you that team. But, It needs to create the team when you click it because I don't want the server full of teams.
???? Thanks, Croc
By A team on click I mean if you are in a certain group and click a TextButton it creates a team and assigns you that team. But, It needs to create the team when you click it because I don't want the server full of teams.
???? Thanks, Croc
You can use the MouseButton1Down event, create the team, and set the player's Team property to it.
As for the group checking.. look use the IsInGroup function.
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)
Once the player leaves the Team, The new team will still be there.
CREDIT TO GOULSTEM
This discussion is preserved as it was. New answers, comments, and votes are closed.