Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can someone help me move a model from one place and back again?

I have this basic script that's meant to move a model from point A to point B. Here it is:

X=script.Parent

while true do
wait()
for i= 1,10 do
X:TranslateBy(Vector3.new(0, 0, -464.487))
wait(1)
end
for i= 1,10 do
X:TranslateBy(Vector3.new(0, 0, 464.487))
wait(1)
end
end


What I need to script is a model moving a moderate speed, flying over to one place and then shifting back to its original position. Instead, my script teleports it 4 times, eventually making it's destination, and teleporting back the same way. May someone help me fix this script?

2 comments

0

Okay, so if you want to move the part to one place smoothly you would use Lerp or TweenService (they’re practically the same thing.) I suggest watching TheDevKing’s video on these two things if you want to know how to use em.

0

Thank you, God bless

1 answer

Did you know that you can tween parts not just GUI objects?

Look into it here.

1 comment

0

I appreciate your help!

This discussion is preserved as it was. New answers, comments, and votes are closed.