How would I go about making a friend chain finder without getting Rate Limited?

How would I make a friend chain finder (Finding someone who is friends with a friend who is friends with someone and so on) using Roblox API without getting rate limited. I do also want to make sure it doesn’t take forever. I have tried making a cooldown when I get rate limited

wait(math.min(backoff_time * 2, max_backoff)

However when I tried using this solution it will most likely take more than 20-40 minutes trying to find the specific user. I have also tried finding examples from users but I couldn’t even find one piece of code for finding friend chain links.

i love bumping my own post :smiley: !!

bump bumpy bumpi bumps bumpo bummy

Your wait time is crazy huge im ngl you should bump it down. Im not sure but waiting around 1-3 seconds should be enough