# Resizing a part on only 1 side?

i’m creating a resizing tool but the BasePart:Resize() function makes it resize in the direction I supplied and also the opposite direction, and I want it to resize on only 1 side
without re-positioning the part

12 Likes

You could increase the size of it in the direction you want i.e. x, y or z, then move the part half the size you increased it by in the direction of the side you want to increase in size. For example, increase the whole part by 5 in the x direction, then move it 2.5 towards the size you want to make bigger so that it seems like it hasn’t moved. I don’t think there’s many other possible ways.

10 Likes

without re-positioning the part

6 Likes

Then no, I don’t think you can.

8 Likes

You can’t do this because the position of a BasePart is determined by the position of it’s centre. By resizing a part in 1 direction, the position of the centre of the part needs to change, so you need to change the position of the part if you want to resize it in 1 direction.

6 Likes

That’s sad on how limited the Roblox engine is

6 Likes

Is there a reason you can’t change the position of the part? You just need to offset the position by half of the amount you resized the part in thesame direction

9 Likes

It’s not really a limitation when you can easily position it by doing what OtterCarbonara said. It’s as easy as

``````Part.Size = Vector3.new(Part.Size.X, Part.Size.Y, Part.Size.Z + 5)
Part.Position += Vector3.new(0, 0, 2.5)
``````
11 Likes

And whats the problem with repositioning a part?

Im afraid no one can give you a unicorn

4 Likes

basically repositioning a part makes the welds move with it which is a no no

4 Likes

Use Weld Constraints. They don’t break when you move a part.

4 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.