In my script, I am trying to make it so that if there is a certain value in the temperature value, the colors of a part will change. However, there is no errors in the output but when the numbers change the color stays the same.
game.ReplicatedStorage.Values.TempHigh.Value = false
game.ReplicatedStorage.Values.TempLow.Value = false
--
local RS = game:GetService("ReplicatedStorage")
local Values = RS.Values
local Temp = Values.Temp
--
while task.wait() do
if Temp.Value <= 40000 then
script.Parent.BrickColor = BrickColor.new("Really red")
game.ReplicatedStorage.Values.TempHigh.Value = false
else
if Temp.Value <= 20000 then
script.Parent.BrickColor = BrickColor.new("Persimmon")
else
if Temp.Value <= 5000 then
script.Parent.BrickColor = BrickColor.new("Dusty Rose")
else
if Temp.Value <= 0 then
game.ReplicatedStorage.Values.TempLow.Value = false
script.Parent.BrickColor = BrickColor.new("Cyan")
else
if Temp.Value >= 50000 then
script.Parent.BrickColor = BrickColor.new("Mulberry")
game.ReplicatedStorage.Values.TempHigh.Value = true
else
if Temp.Value <= -10000 then
game.ReplicatedStorage.Values.TempLow.Value = true
script.Parent.BrickColor = BrickColor.new("Dark blue")
end
end
end
end
end
end
end
script.Parent.BrickColor = BrickColor.new("Really red")