Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How do i make it for it will keep adding 10 not just add it one time?

Asked by 10 years ago

local x = script.Parent.Position.X local y = script.Parent.Position.Y local z = script.Parent.Position.Z while true do for i = 1,10 do print(script.Parent.Position) wait(2.5) script.Parent.Position = Vector3.new(x,y,z + 10) print(script.Parent.Position) end end

1 answer

Log in to vote
0
Answered by
Sublimus 992 Moderation Voter
10 years ago

You have to add each value individually.

x = script.Parent.Position.X
y = script.Parent.Position.Y
z = script.Parent.Position.Z
while true do
    for i = 1,10 do
        print(script.Parent.Position)
        wait(2.5)
        script.Parent.Position = Vector3.new(x + 10,y + 10,z + 10)
        print(script.Parent.Position)
    end
end
Ad

Answer this question