GetFriendsOnline() returns a array, or a table if you say of the player specified friends.
In this example, I'm just going to print out each online friend's VisitorId, PlaceId, and LocationType.
**LocalScript in StarterPlayerScripts: **
01 | local plr = game.Players.LocalPlayer |
03 | for i,v in pairs (plr:GetFriendsOnline()) do |
06 | print ( "Friend #" ..i, " id is " ..v.VisitorId) |
09 | print ( " Last Place Visited Was: " ..v.PlaceId) |
11 | if v.LocationType = = 0 then |
12 | print ( " Is on mobile website" ) |
13 | elseif v.LocationType = = 1 then |
14 | print ( " Is in mobile game" ) |
15 | elseif v.LocationType = = 2 then |
16 | print ( " Is on website" ) |
17 | elseif v.LocationType = = 3 then |
18 | print ( " Is in studio" ) |
19 | elseif v.LocationType = = 4 then |
You should get the basic concept on how it works. Test this, and configure it, and you should get what you need.