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

Bad argument #3 to BrickColor (expected BrickColor, got string)?

Asked by 5 years ago

So, i want my part to change it's brickcolor and material when clicked, but it isn't doing that.

My code: (it's in a normal script)

01local ClickDetector = script.Parent.ClickDetector
02local ogien1 = script.Parent.Parent.ogienjeden.Fire
03local ogien2 = script.Parent.Parent.ogiendwa.Fire
04local ogien3 = script.Parent.Parent.ogientrzy.Fire
05local ogien4 = script.Parent.Parent.ogiencztery.Fire
06local ogien5 = script.Parent.Parent.ogienpiec.Fire
07local sound = script.Parent.Parent.seinfeld
08local part = script.Parent.Parent.Glowna
09 
10ClickDetector.MouseClick:connect(function(plr)
11   ogien1.Enabled = true
12   ogien2.Enabled = true
13   ogien3.Enabled = true
14   ogien4.Enabled = true
15   ogien5.Enabled = true
View all 27 lines...

1 answer

Log in to vote
1
Answered by 5 years ago

line 16 error is that you are using a string instead of BrickColor

1--//Line 16 should look like this
2part.BrickColor = BrickColor.new("Burnt Sienna")
3--//Line 17 is
4part.Material = Enum.Material.CorrodedMetal
Ad

Answer this question