local Parent = script.Parent local ChangeColor = Parent.BrickColor local intValue = game.Workspace.Value if intValue == 1 then ChangeColor = BrickColor.new("Gold") if intValue == 0 then ChangeColor = BrickColor.new("Dark Blue") end end
For some reason this won't work? And it has no output error?
You need to do it like this, when you want to change a property of an object, never set a variable to local x = object.someproperty
, instead use local x = object
Then when you need to change that value, use x.Property = whatever
.
local ChangeColor = script.Parent; local intValue = game.Workspace.Value if intValue == 1 then ChangeColor.BrickColor= BrickColor.new("Gold") if intValue == 0 then ChangeColor.BrickColor = BrickColor.new("Dark Blue") end end