So I want to make this thing where it will show if your friends are playing like the one in meep city But I couldn't find anything on youtube Can someone help me?
if player:IsFriendsWith(playersuserid) then -- insert the userid of the player
Players:GetFriendsAsync
returns a FriendPages
that can be used to get the Player's friends. We need to make sure to pcall
(protected call) the request, since it is requesting data from an external web server, which may be unsuccessful (in which case, the function will error):
local players = game:GetService("Players") -- variant<FriendPages, nil> get_friends(Player player) local function get_friends(player) assert(typeof(player) == "Instance" and player:IsA("Player"), "bad argument #1 to get_friends") local is_successful, friend_pages = pcall(players.GetFriendsAsync, players, player.UserId) if not is_successful then return nil end return friend_pages end