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

How to smoothly move a part?

Hey all. So, I was wondering if there was some sort of Tween() to move a part, like GUIs have. Now, I know your first response would be to use a while loop, and keep updating its position. The issue with that is, if I have just wait(), lag is an issue. If I have wait(0.01), it's a bit jumpy, or a little behind. Any help is appreciated! (By the way, the game is FilteringEnabled)

What I have so far:

v.Position = v.Parent:FindFirstChild('Head').Position + Vector3.new(0, 3, 0)

That's only a portion, obviously. It's a while loop, with wait(). (To be honest, my friend wanted me to ask this, so he won't give the whole script. Copyright purposes.) Thanks!

1 answer

✓ Accepted answer

Hiya, shawn. There's already been quite a few questions about this-and it mainly involves Linear Interpolation.

A question on Linear Interpolation

I also believe you can do this with BodyPositions/Gyros, I can't remember exactly-but go onto YouTube and the ROBLOX channel has this featured in one of their 'Hour of Code' videos.

Hope I helped!

Note while a for loop could still be used, there's much more efficient methods than the one you used!

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