Hello. I’m using the HttpService
for the first time and I don’t know why this isn’t working. I am trying to get the friends count of someone but it doesn’t work and throws up an error. Here’s my code
local HttpService = game:GetService("HttpService")
local function getFriendsCount(userId)
local httpResponse = HttpService:GetAsync("https://friends.rprxy.xyz/v1/" .. userId .. "/friends/count")
local decoded = HttpService:JSONDecode(httpResponse)
return decoded
end
local response = getFriendsCount(game.CreatorId)