Let game scripts use Player Friend Status API

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.

These exist, but they’re locked so only CoreScripts can use them for some reason.
Player.FriendStatusChanged
Player:GetFriendStatus

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.

13 Likes

Obligatory format for feature requests:
https://devforum.roblox.com/t/new-format-for-feature-requests/37232

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?

4 Likes

Updated the post to be more descriptive.

3 Likes

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.

2 Likes

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.

5 Likes