How would I check if a player is online. Like so like if ROBLOX was online a script that would be called would check if he is online or offline. I am thinking of a roblox api that does this, but I cannot find any. Help?
I found the exact same question from a post 2 years ago. Hope this helps!
I have solved this myself here is the code:
function getOnlineStatus(username) local proxy = "https://www.rprxy.xyz" local id = game.Players:GetUserIdFromNameAsync(username) local httpService = game:GetService("HttpService") local user = httpService:GetAsync(proxy .. "/users/" .. id .. "/profile", true) return (string.find(user, "icon%-game") ~= nil) or (string.find(user, "icon%-online") ~= nil) or (string.find(user, "icon%-studio") ~= nil) end
returns true if the user is online return false if they are offline