Maybe this will help:
task.spawn(function()
local x, y = 0, 0
local INCREMENT = 0.1
while RunService.Heartbeat:wait() do
image.Position = UDim2.fromScale(x, y)
x -= INCREMENT
if x < -1 then x = 0 end
y -= INCREMENT
if y < -0.5 then y = 0 end
end
end)
Edit: I just saw your issue – your image is moving out of the screen. Maybe scaling your image to a bigger/out-of-the-screen size will help. Try this: image.Size = UDim2.fromScale(2, 2)
and change the AnchorPoint
to accommodate the size.