what im tring to do is to choose if the plataform(which is a part) CanCollide proprety is false or true depending on the color of a brick called randomAll
local P = workspace.Plataform local randomAll = workspace.Colour.Randomizer --- Colour is a folder and Randomizer is a part while true do if randomAll.BrickColor.Color == BrickColor.new("New Yeller") then P.CanCollide = false end if randomAll.BrickColor.Color == BrickColor.new("Really black") then P.CanCollide = false end end
please,someone tell me whats wrong whit this? i tied a lot of others combinations No errors, just that when the script reaches this part,it just skips it..
Hello Gigaset39, It didn't take me long to figure out the problem, and after testing it out on Studio, It seems to be working:
Your Code:
if randomAll.BrickColor.Color == BrickColor.new("New Yeller") then P.CanCollide = false end
My Solution:
if randomAll.BrickColor == BrickColor.new("New Yeller") then P.CanCollide = false end
As you can see the only thing I did was remove "Color" from "BrickColor"
"Color" is a property of "BrickColor", yet it also is a property of Part
And by the way, remember to add a wait() in your loops
And that's it!
On the other side, if you for some reason wanted to change the Color Property and not the BrickColor property, it'd be different, as you don't use "BrickColor.new" on the Color Property, instead, It would be something like this:
randomAll.Color = Color3.new(248, 248, 248)
But that isn't necessary on this case
Hope this helps!
Full Code:
local P = workspace.Plataform local randomAll = workspace.Colour.Randomizer --- Colour is a folder and Randomizer is a part while true do wait(0.01) if randomAll.BrickColor == BrickColor.new("New Yeller") then P.CanCollide = false end if randomAll.BrickColor == BrickColor.new("Really black") then P.CanCollide = false end end