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

How do I use NormalId to make a part grow but hold its position?

Asked by 6 years ago
          PrimaryPart.Size = PrimaryPart.Size+Vector3.new(0,.1,0)
          PrimaryPart.Position = PrimaryPart.Position+Vector3.new(0,-.1,0)

I have been using this, trying to make the part grow but hold its position but I cant figure it out. I also have the issue that the part grows on both sides which is annoying.

0
Do you even know what NormalId is? User#19524 175 — 6y
0
Doesn't it refer to which direction your part is facing. You use NormalId to make the part go in the direction or add the size in which way you want. Picking which surface you use such as bottom, top, left, right, front and back? Lost_Phantom 4 — 6y
0
Offset the position by half the growth. It's a little unclear what you want, because you can't hold your position with regards to all edges. Which ones do you want to hold? fredfishy 833 — 6y
0
I want it to hold x and y. Im trying to make the part look like its growing in one direction (y) or vertically. But with what I have currently it grows on the top. And not the bottom. I thought if I change the position to .1 of a stud below the current position. It would look like its grow. I feel like NormalID is a better way to do this but Im not sure on how to use it. Lost_Phantom 4 — 6y
0
Sorry, First part of that was trying to tell you I want the part to grow towards the baseplate or to the bottom of the world when its actually going up. Lost_Phantom 4 — 6y

1 answer

Log in to vote
0
Answered by
Launderer 343 Moderation Voter
6 years ago
local Part = game.Workspace.Part
local size = 2
local time = 0.5
local desiredsize = Vector3.new(10, 10, 10)


repeat
Part.Size = Part.Size + Vector3,new(size, size, size)
Part.Position = Part.Position + Vector3.new(0, size / 2, 0)
wait(time)
until
Part.Size == desiredsize
end
0
idk exactly what u mean by you want it to grow down, i think this is it growing up if i think i understand you. so to make it go down just do -size / 2 in the Part.Position Launderer 343 — 6y
0
Thanks! It wasnt exactly what I was looking for, I modified it to do what I need. Thank you very much! Lost_Phantom 4 — 6y
0
You're welcome. Launderer 343 — 6y
Ad

Answer this question