When I play test it solo it works fine but
This error only shows up in console inside a published place.
All I am doing is trying to get the rank of the player with :GetRankInGroup() inside a local script. I have tested it in both server and client side inside studio and works so I think it has nothing to do with being client sided.
@uD0ge yeah but that is some ssl error and I am having curl 52 error where the server is not returning anything. I think maybe the roblox servers are down but this has been happening since 3 days.
You should wrap API calls inside of a pcall and retry if it fails. There are multiple occasions where I get similar errors and it takes a while to finally load their rank. As uD0ge stated, there is already a bug report about these errors.
Example Code
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local function GetRankInGroup(GroupId)
local Success, Error, Data;
Success, Error = pcall(function()
Data = Player:GetRankInGroup(GroupId)
end)
if Error or not Data then
print("Failed to get rank", Error)
wait(1)
return GetRankInGroup(GroupId)
end
return Data
end
All of a sudden, certain team tools, that work based off a group ID, have stopped working even though no changes have been made to the script at all. What’s interesting is, other team tools that uses the same script with different group ID’s are still working and seem to not be affected at all. I have tried to find a solution to this issue and it seems nothing works. The only report that comes out of the Developer Console is this error and nothing else so I assume it has nothing to do with the script or the tools themselves being that other tools are working.
@RedDevED
That’s not true at all, you do not need HttpService enabled to get the rank of a user with GetRankInGroup.
@Cristiano100
That’s very true, although, you cannot contact Roblox’s own servers with HttpService without a proxy. I believe they do this to prevent themselves from getting attacked by their own servers.
@FastAsFlash_Dev
Sometimes, Roblox’s API are down, so when making such requests, wrap them in pcall or xpcall (depending on how you want to handle errors). There’s not much you can do when services are down, unfortunately.
im not talking about httpservice… getrankingroup uses roblox api, it’s a built in feature, its something that is allowed to contact groups.roblox.com this is why i said you dont need httpservice enabled,
The only way you would need it is if you’re using HttpService
To which I say: you cannot contact Roblox’s own servers with HttpService without a proxy. I believe they do this to prevent themselves from getting attacked by their own servers.