Player is killed when player.character property is changed

When I switch the character property of the player it kills them, and I’ve tried looking through every solution to this problem on the developer forums but nothing changes.

Yes, it does, what problem do you have with it?

This is normal, because you’re setting the Character property to nil for however long.

Can you please share your code?

I need to make a character selection menu and there appears to be no alternatives to this method:
Player.Character = newCharacterModel

Yeah, but what are the issues associated with the character dying? I’m sure we can find workarounds for you.

I’d expect that from setting character to nil, but there character property is immediately changed from one character model to another

Completely resetting gui, camera settings, loadout

try putting your original character in a saved folder, and make sure your characters that you wanna change into are in a folder, removing your original character just resets everything, as You, the player dont exist again

This obviously wouldn’t work because you can’t change the character model without destroying it in the process, meaning that the player would automatically die.

so create a folder in ServerStorage named OGCharacter or replicatedstorage and send the local player character in that folder, dont name it exactly like mine im just giving an example

This is because of the “ResetOnSpawn” property in ScreenGui’s.

You can turn off ResetOnSpawn on the ScreenGui, the camera settings shouldn’t be changing if you’re doing it correctly and you can fix the loudout by listening for player death.

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