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

How would I make this vector start at (50,0,0) rather then (1,0,0) ?

How would I make it so that it can start at 50,0,0 and move 1 increment as this makes it start at 1,0,0

for i = 1, 50 do workspace.Part.CFrame = CFrame.new(i, 0,0) wait(1) end

1 answer

You have two options here:

Option 1:

for i = 1, 50 do
	workspace.Part.CFrame = CFrame.new(51 - i, 0, 0)
	wait(1)
end

Option 2:

for i = 50, 1, -1 do --Note the third number. This is the increment and is optional (defaults to 1)
	workspace.Part.CFrame = CFrame.new(i, 0, 0)
	wait(1)
end

4 comments

0

He wants to increment not de-increment.(From what I can tell)

0

He previously asked a question involving incrementation, and the wording also implies decrementation.

0

Both is good but how do I get increment?

0

for VAR = START, END, INCREMENT do creates a variable called var which starts at START and whose value is increased by INCREMENT until END is

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