How do you change the size of one single side on a part?

I was just wondering how you can change the size of one angle using vector3.new.

If you do vector3.new(0,1,0) Y is resized going north and south, but I want it to resize only going north or south.

Is it possible to do this?

1 Like

You can use this BasePart:Resize (roblox.com)

Otherwise, you have to adjust the CFrame by half as much you adjust the size to make it look the way you want upon changing the size.

3 Likes

It is possible to do this.

All you really need to do is add a number to a Vector3.new(0, 0, 0)'s x, y or z,
then change its position according to the x, y or z and side you changed.

If you don’t understand what I just explained, then you can look at the code below.

local function changeSideSize(side, studs, part)
	if side == "top" then
		part.Size += Vector3.new(0, studs, 0)
		part.Position += Vector3.new(0, studs/2, 0)
	end
	if side == "bottom" then
		part.Size += Vector3.new(0, studs, 0)
		part.Position -= Vector3.new(0, studs/2, 0)
	end
	if side == "left" then
		part.Size += Vector3.new(studs, 0, 0)
		part.Position -= Vector3.new(studs/2, 0, 0)
	end
	if side == "right" then
		part.Size += Vector3.new(0, studs, 0)
		part.Position += Vector3.new(studs/2, 0, 0)
	end
	if side == "front" then
		part.Size += Vector3.new(0, 0, studs)
		part.Position += Vector3.new(0, 0, studs/2)
	end
	if side == "back" then
		part.Size += Vector3.new(0, 0, studs)
		part.Position += Vector3.new(0, 0, studs/2)
	end
end
2 Likes

what about changing it when using tween, how do you do it?