For loops running twice

for some reason does my for loop run twice when it should run once the players steps are = 0 but it runs twice

for count = 0,player.leaderstats.Steps.Value,1 do
    print("why")
	amountSteps *= 2.3
end
2 Likes

print count inside of the loop

1 Like

it prints one but it goes twice

1 Like

You have the starting number as 0, when the for loop is ran it will start at 0 and continue to 1 and so on.
In this case it will run twice because it starts at 0 and ends at 1, so you will need it to start and end at 1

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.