Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

This auto-teaming script/autospeed team script does not work. Why not?

Asked by 6 years ago
local Teams = game:GetService('Teams')
local HRs = Teams:WaitForChild('HighRanks')
local Security = Teams:WaitForChild('Security')

game.Players.PlayerAdded:Connect(function(player)
  if player:IsInGroup(2533886) then
        if player:GetRankInGroup(2533886) >= 12 then
            player.Team = HRs
    elseif player:GetRankInGroup(2533886) >= 8 then
            print("hi")
            player.Team = Security
      player.CharacterAdded:Connect(function(char)
        char:WaitForChild('Humanoid').WalkSpeed = 25
      end)
        end
  end
end)

It does not print hi btw

0
i changed >= 8 to == ANDREW50060 1 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

To change which Team the player is listed under on the leaderboard, you have to change their TeamColor.

player.TeamColor = HRs.TeamColor

player.TeamColor = Security.TeamColor

Ad

Answer this question