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

How do I create a custom character loading system?

I read on the wiki that if you want individual players to have different StarterCharacters, you'd need to create a custom character loading system. How do I do this?

1 comment

0

I was wondering a similar thing, how do you set what the player is wearing? And can you make them wear something as a hat, like a model you made.

1 answer

You need a custom character named StarterCharacter. Parent StarterCharacter to StarterPlayer.

I am assuming what you need to do is the following:

go to Players and set the CharacterAutoLoads to false

local RespawnTime = 2

game.Players.PlayerAdded:Connect(function(Player) -- PlayerAdded event Player:LoadCharacter () -- in this case, we have to load the character because CharacterAutoLoads property is set to false.

Player.CharacterAdded:Connect(function(Character) -- Once the character is added we will run this function
	local Humanoid = Character:WaitForChild("Humanoid")
	
	Humanoid.Died:Connect(function()
		wait(RespawnTime) -- time until next respawn
		Player:LoadCharacter() -- add their character again
	end)
end)

end)

1 comment

0

When you parent StarterCharacter to StarterPlayer, it makes every player have that character.

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