KashTheKingYT

Server Team Cap + Team Change

Dec 5th, 2021
1,168
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. game.ReplicatedStorage.TeamChange.OnServerInvoke = function(plr, teamName)
  2.     local team = game.Teams:FindFirstChild(teamName)
  3.     if team and team:FindFirstChild("MaxPlayers") then
  4.         if team.MaxPlayers.Value > #team:GetPlayers() then
  5.             plr:LoadCharacter()
  6.             plr.Team = team
  7.             return true
  8.         else
  9.             return false
  10.         end
  11.     end
  12. end]
RAW Paste Data