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

random startercharacter script wont work?

Asked by 3 years ago
Edited 3 years ago

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

Log in to vote
0
Answered by 3 years ago

nevermind i solved it myself lol

0
lol TrippeDanieI 21 — 3y
Ad

Answer this question