Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

When I resize a part it keeps moving around somehow, how would I fix?

Asked by 8 years ago
for i = 1, 10 do
    part.Size = part.Size +Vector3.new(0.2, 0.2, 0.2)
    wait(0.09)
end

It's anchored and CanCollide is false. There are many other parts that are the same very near it that also teleport up when they try to get resized.

I'm not sure how to fix this, does anyone know how to fix this?

1 answer

Log in to vote
0
Answered by
lomo0987 250 Moderation Voter
8 years ago

What you are going to do is going to want to save the position of the Part and reapply it to it once you resize it.

Pos = part.Position

for i = 1, 10 do
    part.Size = part.Size +Vector3.new(0.2, 0.2, 0.2)
    part.Position = Pos -- I believe this will work, you might need to actually save the Vecter3 Value or doing CFrame to keep it at that position. 
    wait(0.09)
end


Ad

Answer this question