Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
O3hros -3
3 years ago
Edited 3 years ago

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.

Closed as Not Constructive by matiss112233, Pupppy44, and Leamir

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

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
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. O3hros -3 — 3y
0
I edited and made a script for it, you can copy. Gabe_elvin1226aclan 323 — 3y
0
alr i will try using the script O3hros -3 — 3y
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 O3hros -3 — 3y
Ad