I'm trying to change the size of a part called lock. This is the first code I used:
lock.Size = lock.Size - Vector3.new(0, 0, 0.25)
This changes the size, but not the position, so the part comes off the wall.
I added another line to change the position so the part stays on the wall.
lock.Position = lock.Position - Vector3.new(0.125, 0, 0)
But this only works when the part is facing a certain direction. I'm going to use this code for other parts, and it would be inefficient to have to correct the repositioning of the new part every time.
I decided to use the resize function instead, and this fixes the positioning problem.
lock:Resize("Front", 1)
As seen before though, I am trying to change the size by a decimal, but since the second parameter in the resize function only takes integers, I can't do that.
How do I resize a part while keeping it in the same visual position without having to add repositioning each time? Sorry if this is confusing, I tried my best to explain.
