local function tween(obstacle)
local move = TweenService:Create(obstacle, TweenInfo.new(2), { Position = UDim2.new(-0.5, 0, obstacle.Position.Y) })
move:Play()
move.Completed:Connect(function()
obstacle:Destroy()
end)
end
I think you may have forgot the 4th number inside UDim2
Does a thing like this work?
UDim2.new(-0.5, 0, obstacle.Position.Y, 0)
Also, is obstacle.Position.Y absolute size (using pixels) or relative (from 0 to 1)?
If it’s relative the above might work, but if absolute you should replace the positions of the numbers:
So that’s in absolute. Also, the Y position seems really near to 0. So it might be one thing. Looking at your video I saw the the upper squares moved correctly, their anchor position by default might be (0,0) in relative size.
But the below ones are moving diagonally, So you might want to check your anchored position or have something similar to (0, 1) the 1 being the Y position?