Bad argument #3 to BrickColor (expected BrickColor, got string)?
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)
01 | local ClickDetector = script.Parent.ClickDetector |
02 | local ogien 1 = script.Parent.Parent.ogienjeden.Fire |
03 | local ogien 2 = script.Parent.Parent.ogiendwa.Fire |
04 | local ogien 3 = script.Parent.Parent.ogientrzy.Fire |
05 | local ogien 4 = script.Parent.Parent.ogiencztery.Fire |
06 | local ogien 5 = script.Parent.Parent.ogienpiec.Fire |
07 | local sound = script.Parent.Parent.seinfeld |
08 | local part = script.Parent.Parent.Glowna |
10 | ClickDetector.MouseClick:connect( function (plr) |
16 | part.BrickColor = tostring ( "Burnt Sienna" ) |
17 | part.Material = tostring ( "CorrodedMetal" ) |
18 | local ramka = plr.PlayerGui.ScreenGui.Frame |
19 | local tekst = ramka.TextLabel |
23 | tekst.Text = "Kto? podpali? automat biletowy przy zajezdni ?odygowa. *klap klask*" |