I want to be able to change a player's team on a gui button, any help? I think somebody else has same problem lol
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.

2 comments
Check out my answer to this question: https://scriptinghelpers.org/questions/57641/how-do-i-change-the-teamcolor-of-a-player
If your game is FE, use a RemoteEvent to change the player's TeamColor upon pressing your gui button.