Is there a way to get this script to work?
local r = Random.new()
local Bar = script.Parent.Bar
local Store = script.Parent.Parent.SizeValue
while true do wait(14)
Store.Size = Bar.Size
wait(1)
Bar.Size = UDim2.new(r:NextNumber(0,0),r:NextNumber(0,613),r:NextNumber(0,0),r:NextNumber(34,34))
--Past here is where I am asking.
if Bar.Size < Store.Size then
Bar.BackgroundColor3 = Color3.new(0.298039, 1, 0)
else if Bar.Size > Store.Size then
Bar.BackgroundColor3 = Color3.new(1, 0, 0)
end
end
end

2 comments
Again UDim2 has 4 values, you need to compair only one of them. You can also try using AbsoluteSize instead.
Thanks.