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

random startercharacter script wont work?

so i've been working on this little old-roblox styled thing and i created 5 startercharacters, '1', '2', '3', '4', '5' they're all named (excuse my bad grammar) and i put them in a folder named 'characters' in replicatedstorage then made a localscript in StarterPlayerScripts that reads:

local repStorage = game:GetService("ReplicatedStorage")
local folder = repStorage:WaitForChild("characters")
local randChar = math.random(1, #folder:GetChildren())

local charPicked = folder:FindFirstChild(randChar):Clone()
charPicked.Parent = game:GetService("StarterPlayer")
charPicked.Name = "StarterCharacter"

can someone please help me with this i've been tinkering for 2 hours im not kidding

1 answer

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