As a Roblox developer, it is currently impossible to know when a player has sent or received a request to or from another player and cleanly know when friendship status changes without using a loop.
If you have a custom player list and want to show when you’re friends with a person, you would have to repeatedly call Player:IsFriendsWith if their friendship changes. A much cleaner solution would be to use the FriendStatusChanged event.
The default player list shows a pending sign next to names when a friend request is pending and these two API are the only way to know when to do that, but because they’re locked to CoreScripts it’s impossible.
Try describing your specific use case for these methods. What would you do with “knowing the exact moment two players become friends/send a request” and how would this improve your game?
I am in support of this entirely and would enjoy a better API for friends and followers management.
This post has not been updated with 2 major functions, and no duplicate posts have been improved either.
1 year later, and currently, Roblox’s API still does not contain a function usable for enhanced friend API.
I’m currently trying to create a custom leaderboard and I’m running into this wall caused by the API here being locked down, I’d love it if the FriendStatus API as well as a parallel way to check for follower / following status were exposed to developers.
Unfortunately, one major reason for wanting this nowadays is for the FriendRequestSent and FriendRequestReceived statuses to provide more feedback to players on custom leaderboards. Right now, we essentially need to either guess if the friend request was sent or just provide no feedback to players, both of which aren’t ideal. While it is great that we can check when players become / remove friends, it unfortunately isn’t a full-fledged solution (plus it has unresolved issues too).
I know you acknowledge that this isn’t a perfect solution but I’d rather also clarify this further in-case staff believe the underlying use-cases are solved, there are still valid use-cases for this API which haven’t been solved yet.