I am trying to make a quest beacon, the principle goes like this, there are these floating rocks and one of them has a click detector in it, that is the part main, if it is clicked it will change the cursor icon of the click detector (this part works without a problem) but it won't change the color of the bricks. I tried different values both string an numeric but it still doesn't work. In the beginning i thought the problem was in the if declaration but it does change one thing which is the cursor icon so it shouldn't be a problem there.
local model = game.workspace.MysticRocks
local main = model.MainQuest.BrickColor -- Really red 1004 / Cyan 1013
local color1 = model.red1.BrickColor -- Really red / Really blue
local color2 = model.red2.BrickColor -- Crimson / Dark blue
local color3 = model.red3.BrickColor -- Crimson / Dark blue
local color4 = model.red4.BrickColor -- Crimson / Dark blue
local shade1 = model.shade1.BrickColor -- Magenta / Dark indigo
local shade2 = model.shade2.BrickColor -- Bright violet 104 / Royal purple 1031
local shade3 = model.shade3.BrickColor -- Eggplant / Deep blue
local accent = model.pink.BrickColor -- Persimmon / Navy blue
local check = true
script.Parent.MouseClick:connect(function (playerWhoClicked)
if check == true then
script.Parent.MaxActivationDistance = 0
accent = BrickColor.new('Persimmon')
wait(.1)
shade3 = BrickColor.new('Eggplant')
wait(.2)
shade2 = BrickColor.new(104)
wait(.3)
shade1 = BrickColor.new('Magenta')
wait(.4)
color4 = BrickColor.new('Crimson')
wait(.5)
color3 = BrickColor.new('Crimson')
wait(.6)
color2 = BrickColor.new('Crimson')
wait(.7)
color1 = BrickColor.new('Really red')
wait(.8)
main = BrickColor.new(1004)
script.Parent.CursorIcon = 'rbxgameasset://Images/cursorhelp' -- help cursor
script.Parent.MaxActivationDistance = 16
check = false
end
if check == false then
script.Parent.MaxActivationDistance = 0
accent = BrickColor.new('Navy blue')
wait(.1)
shade3 = BrickColor.new('Deep blue')
wait(.2)
shade2 = BrickColor.new (1031)
wait(.3)
shade1 = BrickColor.new('Dark indigo')
wait(.4)
color4 = BrickColor.new('Dark blue')
wait(.5)
color3 = BrickColor.new('Dark blue')
wait(.6)
color2 = BrickColor.new('Dark blue')
wait(.7)
color1 = BrickColor.new('Really blue')
wait(.8)
main = BrickColor.new(1013)
script.Parent.CursorIcon = 'rbxgameasset://Images/cursor (3)' -- quest cursor
script.Parent.MaxActivationDistance = 16
check = true
end
end)

2 comments
http://wiki.roblox.com/index.php/Generic_for . Study the link I provided you with and utilize it on your code. If help is still required then ask.
Pretty interesting concept, so in theory i could just store the parts and colors in different arrays and use a for to change the color of the parts as in part[i] = colorred[i] , am i right?