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

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

Asked by 6 years ago

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)*

0
Basically, im trying to make it when you click a button, the hair turns a diffirent color. The hair is a part. Mynameisguiseppe 15 — 6y
0
`BrickColor.Black()`? TheeDeathCaster 2368 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

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

Ad
Log in to vote
0
Answered by 6 years ago

You're using Brickcolour wrong. Use it like;

BrickColor.new("Really black")

Answer this question