I’m trying to make a simple “friends currently in server” list in my game, but I don’t want to spam the player:IsFriendsWith(userId) yield function every time I want to refresh the player list. The easy solution is to cache all the friend statuses when players join the game. But, this doesn’t account for players that add new friends while they are in game.
Is my best option to just refresh my friend cache every now and then? Or is there an event that tells us when players add friends in game?
StarterGui:GetCore("PlayerFriendedEvent") and StarterGui:GetCore("PlayerUnfriendedEvent"), which both return a BindableEvent. I’m not sure whether or not these account for friends being added through the website or just in-game: