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

BrickColor not working properly?

Hey, I'm having a small issue.

This (Snippet from larger script):

	color = math.random(1,64)
	p.Color = BrickColor.new(color)

This is the error I get, how can i get this to work?

21:26:50.081 - Workspace.Script:7: bad argument #3 to 'Color' (Color3 expected, got userdata)

2 comments

0

Is p happen to be a Gui?

0

p is a "Part", so no.

1 answer

Part's have BrickColor not Color so it should be:

p.BrickColor = BrickColor.new(color)

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