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

Is there a way to make different StarterCharacters for different teams?

1 answer

✓ Accepted answer

What captainbuilda said is correct: "Put the models in ReplicatedStorage ( FE ) or ServerStorage ( Non-FE ) named their respective teams, then when a player is added check their team and clone the model to wherever you need it."

local player = game:GetService("Players").LocalPlayer

spawn(function() --when a player spawns
	if player.Team == game:GetService("Teams").Team1 then --if Team1
		local script = game:GetService("ReplicatedStorage").script:Clone() --clones your script
		script.Parent = game.Workspace[player.Name] --puts the script in your character
	end
end)

--this is the same function except it fires when a player changes team
player:GetPropertyChangedSignal("Team"):Connect(function()
	if player.Team == game:GetService("Teams").Team1 then
		local script = game:GetService("ReplicatedStorage").script:Clone() 
		script.Parent = game.Workspace[player.Name]
	end
end)

1 comment

0

Where do we put this script in

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