Custom Team Characters

Hello. Is it possible to assign a player a custom StarterCharacter based on their team?

1 Like

I think that if you have a StarterCharacter in the Starter folder, that will start to load before the player actually gets a team, so I think thats not possible.
But you dont need to do it like that, just, when the player joins a team just apply a humanoid description that you wish that team should have
ApplyDescription()

he needs to do some more coding and get everything for an ID and some robux for clothing

Sorry what? I dont understand what you mean… get everything for an ID and robux for clothing?

humanoid descriptions requires you to get an ID of an asset, so he needs to use the roblox website in order to do that, and for clothing, it costs 10 robux to make one

image


1 Like

HumanoidDescription is just an Instance in game, that can be created in studio or by script, you can place those ids in there, and just apply that Instance into a character.

You can even get a HumanoidDescription from an existant Humanoid/Character/NPC in your place. You dont need to buy clothes, or an ID.

Plus, OP already has a StarterCharacter, just create a HumanoidDescription from that character and apply it to new players

Mmh, I think I understand what u meant before, you mean that probably OP’s character is manually created, maybe using welded parts, accessories that doesnt exist in roblox, textures, idk, many legs, heads etc. Oh yup in that case, dont use ApplyDescription, but, still as simple as, when player joins a team, replace the old character with the new one which probably is stored in ServerStorage

I just mean this, if its not possible to use HumanoidDescription, then just change the Character. But, do not use StarterCharacter, just change the Character depending on the team, or the HumanoidDescription if possible:

This is a ServerScript in ServerScriptService to handle the character change on join or change team:

I placed a couple of Dummies in Workspace, a red and blue one with some accessories and meshes welded, just to test that custom characters works.
When players join, a team is assignated to the player, then call a function to check that team and perform the character change, and when player changes team same function is called to change the character

local RedDummy = game.Workspace:WaitForChild("RedDummy")
local BlueDummy = game.Workspace:WaitForChild("BlueDummy")

local function ChangeAV(player)
	local NewChar
	
	if player.Team.Name == "Red" then
		NewChar = RedDummy:Clone()
	elseif player.Team.Name == "Blue" then
		NewChar = BlueDummy:Clone()
	end

	local CHAR = player.Character or player.CharacterAdded:Wait()
	local AnimateS = CHAR:WaitForChild("Animate"):Clone()
	local HealthS = CHAR:WaitForChild("Health"):Clone()

	AnimateS.Parent = NewChar
	HealthS.Parent = NewChar
	
	player.Character = NewChar
	NewChar.PrimaryPart.CFrame = CHAR.PrimaryPart.CFrame
	NewChar.Parent = game.Workspace
	CHAR:Destroy()
end


game.Players.PlayerAdded:Connect(function(player)
	warn(player, "joined", player.Team.Name, "team")
	ChangeAV(player)
	
	player:GetPropertyChangedSignal("Team"):Connect(function()
		warn(player, "joined", player.Team.Name, "team")
		ChangeAV(player)
	end)
end)

5 Likes

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