Hello! This is my first time scripting so sorry if this will be obvious So I am trying to make a mining/tycoon hybrid. I got a simple free model mountain (plz no hate), and added some Reddish Brown bricks to it I then added this snippet of code to the bricks that I found online and edited it, so that in theory you would click to mine then the block would turn grey then wait 5 second then it would change back to Reddish brown.
function onClicked(playerWhoClicked)
script.Parent.BrickColor = BrickColor.DarkGray()
wait(7)
script.Parent.BrickColor = BrickColor.Red()
end
It, worked, mostly
See wherever I clicked it it turned grey like intended then after five seconds it would turn red not Reddish brown so then I tried this:
function onClicked(playerWhoClicked)
script.Parent.BrickColor = BrickColor.DarkGray()
wait(7)
script.Parent.BrickColor = BrickColor.ReddishBrown()
end
It then gave me this error: Workspace.Part.Script:4: attempt to call field 'ReddishBrown' (a nil value) and the block was bright red again! I cannot seem to change this please help!

1 comment
Its "BrickColor", not "Brickcolor".