There are a few of different problems with your script and I will help you fix them
1) Syntax
Your first problem would be the syntax. Position is a Vector3 value, so if you want to do math on it, you have to do it with either a constant or another Vector3 value. The Vector3 constructor is Vector3.new, so you would put that around all the number values. Also, you used the keyword then wrong at the end of your code. then is only supposed to be used in an if statement, like so:
repeat
wait(.5)
script.Parent.Position = script.Parent.Position - Vector3.new(0, 0, 5)
until
script.Parent.Position = Vector3.new(-2402.83, 510.332, -895.993)
script.Parent.Position = Vector3.new(-2402.83, 510.332, -1320.103)
2) Loop
I would highly recommend that you do not use a repeat loop. I don't find them to be very useful. In your situation, you're trying to subtract a constant value from a position until that position is equal to another vector. Well, with the way floating point math works in roblox is that decimals will never be equal to each other because roblox will add other numbers to the decimals. For example, 0.3 will not be equal to 0.3 because roblox will add other digits to the decimal, making it something like 0.29999999998 or 0.30000000001.
In your situation, I would use a for loop, because a for loop iterates only a specific number of times and then stops. Based on your code, you'll want to subtract 0,0,5 from the position 424 times. So the fixed code would be:
for i = 1, 424 do
wait(0.5)
script.Parent.Position = script.Parent.Position + Vector3.new(0, 0, 5)
end
script.Parent.Position = Vector3.new(-2402.83, 510.332, -1320.103)
3) Repetition
You want to make the whole process repeat over and over again, so the simplest solution would be a while loop. Basically, a while loop will repeat over and over again until the conditional between the while and the do is false. So in a while true do loop, it will run forever because the true conditional will never become false, like so:
while true do
for i = 1, 424 do
wait(0.5)
script.Parent.Position = script.Parent.Position + Vector3.new(0, 0, 5)
end
script.Parent.Position = Vector3.new(-2402.83, 510.332, -1320.103)
wait()
end
Hope this helped!