local TS = game:GetService("TweenService")
local block = script.Parent
local blockB = game.Workspace:FindFirstChild([Name Of the block you want to move to here])
local blockBP = blockB.Position
local blockTween = TweenInfo.new(
2, -- Time of tween
Enum.EasingStyle.Linear, -- Moves back and forth linear
Enum.EasingDirection.Out, -- Moves out of origin
-1, -- This makes the tween run infinitely
true, -- It can reverse meaning it goes back and forth
0 -- Delay time
-- Feel free to change any of these things if you want
)
local newTween = TS:Create(block, blockTween, {Position = blockBP}) -- Makes part A move to part B's position
newTween:Play()