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

Trying to randomize the torso brickcolor of my character. How do I do this?

So I have a starter character, and I'm trying to make it so every time you spawn in, you get a different torso color. I know this is a really basic thing, but I cant seem to get it.

Please help. (note: script is child to the torso)

local Torso = script.Parent.Parent.Torso
Torso.BrickColor = nil
Torso.BrickColor = BrickColor.Random()

1 comment

0

ur script is correct, except that BrickColor.Random() should be BrickColor.random()

1 answer

✓ Accepted answer

Hi, just use Bricolor.pallette like so

local random = math.random(1,27)
local Torso = game.Workspace.Part -- wherever your torso is
Torso.BrickColor = BrickColor.palette(random)
print(random)

dont go above 27

hope this helps

1 comment

0

it worked! Also figured out I had to put the script in starter character scripts. Thanks!

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