Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I need help with spawning as random characters i made in my folder?

So I made a folder full with 3 characters I made and I want it to make so I spawn with one of them and it doesn't work.

please help! thanks.

1 answer

Please insert the model inside StarterPlayer and not in StarterCharacterScripts nor StarterPlayerScripts. I believe you can only insert 1 model. Also note that insert the model and not the folder. Reply back if this doesn't work.

ServerScriptStorage - Script

local CharacterModel = game.Workspace.FolderName

local function chooseCharacter()
    local chosen = math.random(1, #CharacterModel:GetChildren())
    return chosen
end

local chosenCharacter = chooseCharacter()
local cloneCharacter = CharacterModel[chosenCharacter]:Clone()

cloneCharacter.Parent = game.StarterPlayer

4 comments

0

yes, I know but I thing is I want to make a script that picks a random character from the folder and inserts it to the starter player thanks for the reply.

0

I edited and made a script for it, you can copy.

0

alr i will try using the script

0

It doesn't spawn me as any character i spawned as my deafault roblox character maybe i did something wrong but i don't think so, would you mind maybe making an uncopylocked game for it or do something to help me. Thanks

This discussion is preserved as it was. New answers, comments, and votes are closed.