Player::LoadCharacter should return the new character

It’s a little bit of a pain to constantly have to do.

player:LoadCharacter()
local character = player.Character or player.CharacterAdded:wait()

When we should be able to do.

local character = player:LoadCharacter()
21 Likes

And we should be able to withhold the character from being parented to the workspace so we don’t have to do

characterAdded:
character.Parent = nil

player:LoadCharacter()

3 Likes

[quote] And we should be able to withhold the character from being parented to the workspace [/quote]You could alternatively just load the character when it is needed using this method.

It’s not for that. It’s for scenarios where I need to prepare the character with armor and equipment, manage their appearance (i.e. get rid of package morphs if needed), make sure all client scripts are running, etc before spawning them into the world. All of those should be done before you even think about spawning them into the world, but you have to use the ugly method of parenting their character to nil to accomplish that right now.

I’d suggest a separate method so that people know the method yields. For example,

player:LoadCharacterAsync()

pls no

Async is already evil enough as it is

[quote] pls no

Async is already evil enough as it is [/quote]

I don’t agree with the naming convention but if it returns character, it will have to yield until the character is loaded; hence why I think it’s a good idea.

1 Like

This is probably one of the biggest frustrations with making games on Roblox using traditional/ modified characters

I’d like to raise this topic once again.

I’d like to bring this up again.

1 Like

This would still be a great quality of life feature that I’d benefit from. I imagine the new avatar loading event ordering improvements would make this trivial to implement:

:LoadCharacter() still returns nothing. It would be useful to have it return the character because if a developer is manually loading the character, they’re likely doing other modifications to the character too

16 Likes