How to delay spawn Character?

when players join my game, they will load a lot of information, then when their character is added, it will activate the function.
But the information when players join the game has not finished loading, the character added makes the script broken. How to make a player’s character wait a few seconds?

3 Likes

Manually respawn them via scripts using Humanoid.Died and Players.PlayerAdded

Start by turning off Players.CharacterAutoLoads and then use Player:LoadCharacter() to spawn them in.

11 Likes

what is CharacterAutoLoads and LoadCharacter ? i dont know about it. Can you give me more infomation ?

1 Like

Use https://developer.roblox.com/ and search or click the links.

1 Like

CharacterAutoLoads basicly spawns your avatar you have in. LoadCharacter basicly does the same but manually activated by a script.

2 Likes

i can not use it, error 503. i dont know what happen with it

1 Like

You can also use Players.RespawnTime, but if you do, you won’t be able to control when you want them to respawn, just how long until they respawn (in case loading takes a varying amount of time)

1 Like

how can use it ?
Player.CharacterAutoLoads(false) ? i must disable it ?

1 Like

If you want to be able to manually spawn their character without the automatic respawn, literally just tick the box off on the Players service by clicking it. (In Explorer and Properties)

1 Like

Found in the Players class, it is true (box has mark) by default, that’s it.

1 Like

when i disable it, character will wait command to add ?
i use player:LoadCharacter() to do that ?

1 Like

LoadCharacter loads the character manually. Yes.

1 Like

Yes, use it after you finished loading whatever you need to load for that player, and if you want them to respawn, do the same, except after they die instead of when they join.

1 Like

thank you all, i can do it, thank you very much

1 Like