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

How to change Team of a Player?

1 answer

Change the Team property of the player upon the button click

local targetTeam = game:GetService("Teams")["Team name"]
button.MouseButton1Click:Connect(function()
	game:GetService("Players").LocalPlayer.Team = targetTeam
end)

2 comments

1

Changing a player's team client-side will not replicate.

0

Yeah

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