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

Moving a model using TweenService?

1 answer

Hello,

local tweenService = game:GetService("TweenService") --Get the tween service.
 
local part = Instance.new("Part") --Make a new part.
part.Position = part.Position --ignore 
part.Anchored = true --Part is anchored.
part.Parent = game.Workspace --The parent of the part is workspace
 
local goal = {} --Table.
goal.Position = Vector3.new(x,y,z) --Where you want the part to go (world coordinates) (change x y z to coordinates)
 
local tweenInfo = TweenInfo.new(4) --Speed (The lower the number the fastest the tween)
 
local tween = tweenService:Create(part, tweenInfo, goal) --Give the tween info.
 
tween:Play() --Execute the tween.

This is how you move a part

~Frag

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