Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do you make a tile scrolling animation?

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

1 answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.