Advertisement
KashTheKingYT

Server Team Cap + Team Change

Dec 5th, 2021
2,873
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  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]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement