Size Change in One Direction

Is there a way to change the size of a part in only one direction? For example, if I wanted a block to only increase by 1 stud in the positive Y-direction every 5 seconds, how would I do this? Right now my script is changing it in both the positive and negative Y-directions.

2 Likes

You’d have to also tween the position by have the size you’re increasing in the direction you want

If you want to tween the size by 1 stud in the Z axis, tween the position of the part in the Z axis by 0.5 (half size)

Edit: Okay how did I think you were wanting to tween. Think my lgoic would still apply regardless if it’s for a tween for not, just position it by half the increment

2 Likes
local increment = 5 -- the length you want to size in studs
local part = script.Parent -- the part you want to size
part.Size = part.Size + Vector3.new(0, increment, 0) -- move increment to the axis you want to size it on
part.Position = part.Position - Vector3.new(0, increment, 0)-- move increment to the axis you want to size it on
1 Like

I am not sure if it works but you could try moving the pivot point to be at the start of where you want to expand to.

Other wise just use maths to calculate where the part should be

2 Likes