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

How do I add the previous Vector2 to a new one?

What I want: for i=1,420 do script.Parent.CanvasPosition=Vector2.new(i, 0) + [Previous Vector2] end

How do I add the previous Vector2?

Exactly what I am trying to do:

I have a scrollframe that is 1260 long horizontally and I want to use the above script to translate the CanvasPosition from (0, 0) to (420, 0) and then when I run the script again I want it to go from (420, 0) to (840, 0)

1 answer

✓ Accepted answer
for i=1,420 do 
	script.Parent.CanvasPosition= script.Parent.CanvasPosition + Vector2.new(1,0)
end

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