Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

1 comment

0

i changed >= 8 to ==

1 answer

✓ Accepted answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.