How to make a player have a random character from a folder

How would i make a script that changes the players character on respawn?

I already figured out how to change the character but now i need to detect when player respawns.
And no you cannot use player.CharacterAdded since it would just loop because applying a new character to a player also fires this event. Any help would be awesome

1 Like

If there’s a player.CharacterAdded then shouldn’t there also be a player.CharacterSpawned?

If there isn’t, then detect when the player dies, wait however many seconds it is until they respawn, then change it.

Use CharacterAdded, and add an attribute to custom characters to signify it’s custom. If the character has that attribute, simply stop the function (return)

No need to complicate things that can be done with simple tagging mechanisms!

Ok i found a solution. I turned of load character on start and used the script from roblox wiki and edited it so insted of using Player:LoadCharacter() i use a function which sets the model as a character for the player

There isn’t a RBXScriptSignal named “CharacterSpawned” as it would be identical to “CharacterAdded”.

1 Like

Ok, that’s what I thought. The second part might work though.