I made script that does a loop for a limited amount of times before i stops but it continues to go on forever why isn't it working?
local Times = 10
while Times > 0 do
if Times > 0 then
script.Parent.bodyVelocity.Velocity = (script.Parent.CFrame.LookVector * 10)
wait(0.1)
Times = Times - 1
print("Seconds remaining: "..Times.."")
wait()
end
end

3 comments
add an else then write break
also mark this question as solved
How do I mark as solved