Create smooth movement of tiled image

I wanna be able to create a smooth image movement across the screen, using a tiled image. However, I can’t figure out the timing or positioning to get it right. The original image is 512x512 and thus TileSize is 512x512.

while true do	
	script.Parent:TweenPosition(UDim2.new(-0.5, 0, 1, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 1, true)
	wait(1)
	script.Parent.Position = UDim2.new(0, 0, 1, 0)
end

ezgif.com-video-to-gif (3)
Can see it kinda glitch when the position resets.

1 Like

I have also had this issue, try switching the ‘true’ inside the Tween Properties to false (it wont override any other parts of the script, therefore making a wait(1) necessary, while leaving it true might be causing the issue.) You could also try changing the EasingDirection to InOut

Right, I think i found a solution. Try doing:
Change the ‘200’ to the size of the tile. EG: 512. The faster you want it to move, do (512 * Speed)
Hope this helps!
Edit: Keep it at 512, I forgot about the time of the tween! lol

while true do	
	script.Parent:TweenPosition(UDim2.new(0, -200, 1, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 1, true)
	wait(1)
	script.Parent.Position = UDim2.new(0, 0, 1, 0)
end