Infinite gui animation script not working

I’m using the script from this post,

local image = script.Parent

local function whenTweenCompleted(state)

    if state == Enum.TweenStatus.Completed then --if the tween actually completed and not interrupted, but you don't need this if you set override to false like we did

        image.Position = UDim2.new(0, 0, -0.5, 0)
    
    end
end

image:TweenPosition(UDim2.new(-1, 0 -0.5, 0), "Out", "Linear", 0.5, false, whenTweenCompleted) --set the easing style and direction to what you like

I’ve tried it in a localscript and script and it’s done nothing each time. This is what my explorer looks like.

Let me know if you need more information!

Try using while true do with waits in it.