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

How do I use TweenService for MoveTo?

I've been doing a lot of work with MoveTo but I am really not a fan of how it moves all at once. Is there a way to get the model to smoothly move instead of just teleport?

This is what I've been trying to do:

local TweenService = game:GetService("TweenService")
local Part = game.Workspace.Plane

local Info = TweenInfo.new(3, Enum.EasingStyle.Quart, Enum.EasingDirection.InOut, 0,true,0)
local Goals = {Position = Part:MoveTo(Vector3.new(-19.25, 10, 70.739))} 
local Goals2 = {Position = Part:MoveTo(Vector3.new(-19.25, 0.5, 70.739))}
local Tween = TweenService:Create(Part,Info,Goals)
local Tween2 = TweenService:Create(Part,Info,Goals2)

while true do
	Tween:Play()
	wait(4)
	Tween2:Play()
	wait(4)
end

1 answer

###Lines 5 and 6 should look like this:

local Goals = {Position = Vector3.new(-19.25, 10, 70.739)}
local Goals2 = {Position = Vector3.new(-19.25, .5, 70.739)

5 comments

0

I know. I'm trying to smoothly move a whole model.

0

Use SetPrimaryPartCFrame then. Make sure PrimaryPart isn't nil.

0

What should the primary part be?

0

The primary part.

0

Of your model. The one that you may mostly use.

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