So my script currently works, except for the fact that even if the parts Y size is above 2.4, it will still gain value.
How can I make it so it will stop for that specific child?
while wait() do
for index, child in pairs(game.Workspace.Lawn:GetChildren()) do
if child.Size.Y ~= 2.4 then
child.Size = child.Size + Vector3.new(0,0.2,0)
else
child.Size = child.Size + Vector3.new(0,0,0)
end
child.CanCollide = true
child.Anchored = false
wait(0.05)
child.CanCollide = false
child.Anchored = true
end
wait(10)
end

1 comment
Line 5 would error, since you cannot add CFrame values. Change it to + Vector3.new(0, 0.1, 0)