How to move a part and back then back 10 studs

Hello everyone. I want to move the green part to positionPart and back 10 studs to back


Captura de tela 2022-01-18 093410
There’s a function that make it? Afther move to the part the green part move more 10 studs to back? Actually I want to teleort to the part but keep a distance of 10 studs from the part

1 Like
local Part = script.Parent
Part.CFrame -= Vector3.new(10)
task.wait(5)
Part.CFrame += Vector3.new(10)

Note that the part may move differently based on the built access. (Part’s Size Orientation + World Axis); If you find that it’s not positioned correctly, use the “Z” axis rather than the “Z” axis.

3 Likes

Do you want a platform that a player can stand on while it’s moving? Then CFraming it won’t work.

Try using the Search tool up top and typing in “moving platform”. You’ll get a bunch of previous posts with their Solutions as well.

2 Likes