Teams

Teams is a service that manages different groups or teams of players within the game.

It allows you to create and manage teams, which can be used for team-based gameplay, such as assigning players to different sides or groups.

Auto Assign Team

You can use the Teams service in Roblox to divide players into different teams. When enabled, the service automatically changes the color of the player's name above their character to reflect their team, making it easy to distinguish between members of different teams.
Image 1
Image 2
Roblox Studio

Manual Assign Team

You can manually assign players to specific teams by unchecking AutoAssignable for all Teams.
local Players = game:GetService("Players")
local Teams = game:GetService("Teams")

Players.PlayerAdded:Connect(function(player)
	local team = Teams:FindFirstChild("Team2") 

	if team then
		player.Team = team
		print("Assigned to Team2")
	else
		warn("Team2 does not exist. Player was not assigned to a team.")
	end
end)

Team SpawnLocation

  • 1. Add a SpawnLocation
  • 2. Update SpawnLocation Properties (Uncheck Neutral and TeamColor matches with Team’s Color)
Image 1
Image 2
Image 3
Roblox Studio

If you found this tutorial helpful and would like to support my work, please consider buying me a coffee.

Thank you very much for your support!

Buy me a coffee