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

How do you convert a string to a BrickColor?

Background: In my Character Creation I have a string value that store's the player BrickColor name.
Such as:

local StringValue.Value = "Really red"

Question: How do I go about converting that string value to an actual BrickColor. When the player joins their BrickColor's name is saved in the string, but I can't just say

Player.Character["Right Leg"].BrickColor = StringValue.Value

because it outputs: bad argument #3 to 'BrickColor' (BrickColor expected, got string)

Is there a way to convert this?

1 comment

0

I'm going to moderate this as OT because you answered your own question. +1 for a good question, +1 on the answer so you don't lose rep from moderation.

1 answer

I figured out how to do it just convert the whole thing to a BrickColor.

So

Player.Character["Right Leg"].BrickColor = BrickColor.new(StringValue.Value)

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