Checking if two player are friends without a player instance

I’m making a game that shows which people someone is friends with, however since Player:IsFriendsWith() requires a player instance, I’m only able to check the friends of everyone who is currently in the server, which would highly limit my game.

I know there are other ways of checking friends, like Players:GetFriendsAsync(), however I assume that is quite slow and I need my game to be as optimized as possible. I could also do some kind of Roblox HTTP request, but that’d require a proxy which Idk if I feel like finding/creating/buying one of those.

If there’s any solution I missed, please let me know. Thank you.

Those are your only solutions. Call Players:GetFriendsAsync on the server, as I find the server has a higher request limit. You can implement a cross-server caching system, but that could end up being more work than it’s worth. Don’t over-stress about making external APIs work faster

2 Likes

Alright, thank you! I was considering making some sort of cache, but that seems like it’d work!

I’ll keep the post open a little bit longer in case someone else has another idea, but if not I’ll mark your reply as the solution.

If you’re going to implement cross-server caching, make sure it’s for multi-user queries

What do you mean multi-user queries?

Queries that involve retrieving more than one user’s information

can you give a short code example of this pls

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