I am just beginning to learn coding, I am currently messing around with a block of "grass" that increases in height every 5 seconds.
While true do wait(5) game.Workspace.Part.Size=game.Workspace.Part.Size+Vector3.new(0,0.2,0) print("grass has grown") end
this works perfectly, except it keeps going on forever. What I want to learn is how to phrase the While statement to stop when the part reaches 2 studs tall. I have tried the does not equal, but I am not sure how to phrase that to check the Y value
While game.Workspace.Part.Size~=(2) do wait(5) game.Workspace.Part.Size=game.Workspace.Part.Size+Vector3.new(0,0.2,0) print("grass has grown") end
But that code doesnt work for what I need it for, and if I try
While game.Workspace.Part.Size~=(0,2,0)
it doesnt recognize it as valid.

2 comments
My way is way simpler.
I mean... mine is literally an addition of the function "Vector3.new", whereas yours is a while new (and extremely flawed) system.