How can I spawn in as different characters every time I die?

So I have a folder that holds 2 characters and I want the game to select between those two characters for me to spawn in as. How would I script this?

1 Like

Maybe something like this? This will select a random character from your folder:

local folder = -- path to folder
local charaters = folder:GetChildren()
local chosenCharacter = characters[math.random(1, #characters)]
3 Likes