I have a code to make a block grow.
block = script.Parent
pos = block.CFrame
speed = 1
while wait() do
block.Size = block.Size + Vector3.new(0,1, 0)
block.CFrame = pos
wait(10)
end
This works fine. However, I would like it to stop growing at a certain height. How would I do this?

2 comments
Use an if statement so just do "if block.Size.Y > 5 then..." You can use a break to end the loop if the conditional is true.
Yeah nevermind, I did not know there was a .Y lol c;