So I was trying to make a tile scrolling animation where a pattern would scroll down forever but it won't reset the animation so it would just fly off the screen. how do I fix this?
Scroll = script.Parent while true do wait() Scroll.Position = Scroll.Position + UDim2.new(0, 0,0.1, 0) print (Scroll.Position) if Scroll.Position >= UDim2.new(0, 0,0, 0) then Scroll.Position = UDim2.new(0, 0,-1, 0) print("Animation reset") end end
You cant compare a Position with Udim2 like that because it doesn't know exactly what u want to compare. I assume you want to compare the y scale. Replace line 7 with
if Scroll.Position.Y.Scale >= 0 then