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

How do i use FromNormalId for this project?

Asked by 8 years ago

Hello. I am trying to make a script where a part grows slowly upwards but when it hits a brick it stops, i did not want to just use the Vector3.new and add to it each time because then it would jump on top of the brick where i want it to stop. So i was going to use FromNormalId but its complicated so can some one help me please help me?

``local Part = script.Parent

local Growth = 0.1

while true do

wait(0.2)

Part.Size = Vector3.FromNormalId(Enum.NormalId.Top,Growth)

end

1 answer

Log in to vote
0
Answered by 8 years ago

Don't
Reset the position instead

local c = part.CFrame;
part.Size = part.Size + IncrementVector;
part.CFrame = c;

This assumes that your part is anchored. It also assumes that you know roughly where you're planning on stopping at.

0
Was i suposed to give a IncementVector and part a value if this is true why does it give this error? Workspace.Part.Script:6: bad argument #2 to '?' (Vector3 expected, got number) OTheBluePhoenixO 10 — 8y
0
IncrementVector can probably be Vector3.new(0,Growth,0) PlsNoDiscrimination 0 — 8y
Ad

Answer this question