In some game i saw some menu that showed your friends current status, what they were playing, if they were online,etc.
Im searching on how to do this but i cant find information, so im trying to get an user or player current status.
Example:
In some game i saw some menu that showed your friends current status, what they were playing, if they were online,etc.
Im searching on how to do this but i cant find information, so im trying to get an user or player current status.
Example:
The method Player:GetFriendsOnline() can be used to get info on your online friends their statuses
Example usage:
local localPlayer = game:GetService("Players").LocalPlayer
for _, friendData in next, localPlayer:GetFriendsOnline() do
print(string.format("friend %s is playing: %s", friendData["UserName"], friendData["LastLocation"]))
end
Could i do this with a specific user?
Yeah but they have to be a friend of the LocalPlayer.
local localPlayer = game:GetService("Players").LocalPlayer
for _, friendData in next, localPlayer:GetFriendsOnline() do
if friendData.UserName == "PLAYER_NAME" then
print(string.format("friend %s is playing: %s",
friendData["UserName"], friendData["LastLocation"]))
end
end