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

Can you create team-specific StarterCharacters?

I currently have a model titled "StarterCharacter" placed in the StarterPlayer folder, which changes the appearance of a player once they spawn.

I have a Red Team and a Blue Team, and I would like to have each player spawn with a different appearance depending on which team they are on.

Is it possible to create two separate StarterCharacters that only change the appearance of a player if they are on a specific team?

1 answer

✓ Accepted answer

I actually just recently finished making a custom character system which will let me change my character without using the "startercharacter" method:

local respawnDelay = 3
 
game.Players.CharacterAutoLoads = false
 
game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		-- find the humanoid, and detect when it dies
		local humanoid = character:FindFirstChild("Humanoid")
		if humanoid then
			humanoid.Died:Connect(function()
				wait(respawnDelay)
				player:LoadCharacter()
				wait()
				local newmodel = game.ServerStorage.TestRig:Clone()
				wait()
				newmodel.Parent = game.Workspace
				wait()
				newmodel.Name = player.Name
				repeat wait() until
				newmodel.Parent == game.Workspace
				
				player.Character = newmodel
			end)
		end
	end)
	player:LoadCharacter() -- load the character for the first time
end)

its pretty easy, you first disable autospawning and set up a manually respawn system. I took this one off of the wiki on :loadcharacter. right now I haven't made the mechanics that switch it out. but you can use an object value or a string value to represent "newmodel". newmodel is the model you wish to turn into.

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