How to make a loop where the position of a "Part" will move over time

I would like to know how I make a loop in which a “part” will move over time without going here:

1 Like

You need to be adding the value on to the Position rather than running several lines of code which increase the position one by one.

Example:
while true do
wait(1)
workspace.Baseplate.Position = workspace.Baseplate.Position.X + 1
end

Just switch out the Position.X for the axis you want to use, and the +1 for how much you want the Baseplate to move.

2 Likes

Pretty sure you can’t increase X value like that. You need to create a new Vector3 value and add on top of it like this:
workspace.Baseplate.Position += Vector3.new(1, 0, 0)

4 Likes

thanks, I already figured out how to do

hmmmm… i believe you are trying to tween the part.
try using tween service.
eg:

local part = game.Workspace.Baseplate --whichever part u want
local tween = game:GetService("TweenService")
local tweentime = 3 -- time taken to tween the animation
tween:Create(part,TweenInfo.new(tweentime),{Position = Vector3.new(0,4,0)}):Play()
2 Likes