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

How to fix this script? "bad argument #3 to 'BrickColor' (BrickColor expected, got function)

This is the output *18:21:30.293 - Game @ 03 Mar 2018 18:21 was auto-saved Loading Smoother Finished Loading Block Identifier 18:21:31.621 - Unable to load plugin icon. 18:21:38.513 - Workspace.Folder.HairColour.Black.Script:5: bad argument #3 to 'BrickColor' (BrickColor expected, got function) 18:21:38.513 - Stack Begin 18:21:38.514 - Script 'Workspace.Folder.HairColour.Black.Script', Line 5 18:21:38.514 - Stack End * This is the script in question

*function onClicked() script.Parent.Parent.Parent.Hair.BrickColor = BrickColor.Black end

script.Parent.ClickDetector.MouseClick:connect(onClicked)*

2 comments

0

Basically, im trying to make it when you click a button, the hair turns a diffirent color. The hair is a part.

0

BrickColor.Black()?

2 answers

Instead of BrickColor.Black do BrickColor.new("Black")

You're using Brickcolour wrong. Use it like;

BrickColor.new("Really black")

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