Assign Team to Player and make it stay

  1. What do you want to achieve? Assign a team to a player once from a screengui, and after they rejoin, they will keep the team.

  2. What is the issue? I do not know how to do this.

  3. What solutions have you tried so far? I looked on Devforum, and Youtube.

Here’s a part of my script for the teams.

local qk = setmenu.Quinte
local tk = setmenu.TK

local Teams = game:GetService("Teams")

local tkteam = Teams.Telekinesis
local qkteam = Teams.Quintekinesis

qk.MouseButton1Click:Connect(function()
	player.Team = qkteam
	setmenu.Visible = false
end)

tk.MouseButton1Click:Connect(function()
	player.Team = tkteam
	setmenu.Visible = false
end)

Assign the team by using a RemoteEvent to fire code from the Client to the Server, so that way the change occurs to all Players, then use DataStoreService to save that piece of Data After being Recieved from the RemoteEvent to the Players UserId

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.