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

Is there another part movement method than CFrame/Position/MoveTo?

Asked by 9 years ago

I've seen some places (Super Paper Mario and Deathrun 3, for example) that use some sort of Roblox Physics to make parts move.I'm not talking about motors (Rotation) I'm talking about movement. Deathrun 3 makes a 'hand' move on an invisible 'wire' that it goes along. I would like to know how to do this. Thanks in advance!

1 answer

Log in to vote
4
Answered by 9 years ago

Another method of movement is with the use of a BodyMover, which can achieve moving objects through the air. I have created an example that will move between four points with the use of a BodyVelocity and a BodyGyro.

01local part = script.Parent
02local gyro = part:WaitForChild("BodyGyro")
03local velo = part:WaitForChild("BodyVelocity")
04 
05local nodes = { -- where the brick floats to
06    Vector3.new(10,10,10);
07    Vector3.new(10,15,-10);
08    Vector3.new(-10,10,-10);
09    Vector3.new(-10,5,10);
10}
11local speed = 10
12 
13local n = 1
14local node = nodes[n]
15 
View all 30 lines...
0
There is also the lerp method. Look for it in the wiki. I haven't done much with it but it can move a part from one point to another very quickly. AZDev 590 — 9y
Ad

Answer this question