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

[UPDATED] How do I randomize the startercharacter for my roblox game?

Asked by 5 years ago
Edited 5 years ago

Hello,

My idea is that when the player joins/respawns the game will pick between 10 different startercharacters for the player to appear as. I'm not sure how to do this, though, any help is appreciated!

UPDATE

Right now I have:

  • a group of startercharacters named nil in ServerStorage
  • a script in serverscript service

The script is as follows: local players = game:GetService("Players")

players.PlayerAdded:Connect(function(plr)

local clone = math.random(#game.ServerStorage.Chars:GetChildren()):Clone()

clone.Parent = game:GetService("ServerStorage")

clone.Name = "StarterCharacter"

plr:LoadCharacter()

clone:Destroy()

end)

It still isn't working and I'm unsure why, any help is appreciated!

0
What are you trying to do? Why are you trying to make a clone only to destroy it without ever trying to do anything with it?? vanilla_wizard 336 — 5y
0
No, I'm trying to clone startercharacters from server storage, have the game pick a random starter character, and assign it to the player when they join RepubIician 0 — 5y

Answer this question