ListFunctions.generateChars = function(Decrease_or_Increase)
ListFunctions.Clean()if Decrease_or_Increase == "Decrease" then CURRENT_INDEX -= 50 else CURRENT_INDEX += 50 end print(CURRENT_INDEX) local CurPos = StartPos local GridNum = 15 local Spawned = 0 for i = 50,1,-1 do local SelectedUserId = List[i + CURRENT_INDEX] --print(i + CURRENT_INDEX) if SelectedUserId == nil then print("nil!") continue end local newCharPos = CharFunctions.CreateCharacter(SelectedUserId,CurPos) if newCharPos == nil then continue end if Spawned >= GridNum then Spawned = 0 CurPos = Vector3.new(StartPos.X,CurPos.Y,CurPos.Z + Offset) else Spawned += 1 CurPos = newCharPos + Vector3.new(-Offset,0,0) end end
end
This functions launches more than 1 time and while it launches the loop is still working and it’s not stopping, any ways i can stop it on a new function launch?