The title mentions it all. Let’s say that I want to detect that someone has the Bricksmith Badge or Administrator Badge.
Upon joining, I may detect them in my game to grant special privileges.
The title mentions it all. Let’s say that I want to detect that someone has the Bricksmith Badge or Administrator Badge.
Upon joining, I may detect them in my game to grant special privileges.
I did some digging and found the Roblox API which you can request for Roblox Badges:
https://accountinformation.roblox.com/v1/users/1/roblox-badges
I’m not so familiar on how you can post a request to get the information from the API though. I just know that you need a proxy to connect to the API.
local httpService = game:GetService("HttpService")
local getBadges = function(userId)
local success,response = pcall(function()
return httpService:GetAsync(`https://accountinformation.roproxy.com/v1/users/{userId}/roblox-badges`)
end)
if success and response then
return httpService:JSONDecode(response)
else
return false
end
end
print(getBadges(1))
-- local script
local plr = game.Players.LocalPlayer
local BS = game:GetService("BadgeService")
local administratorBadgeId = 1598556792
if BS:UserHasBadgeAsync(plr.UserId, administratorBadgeId) then
print("Player has badge")
else
print("Player does not have badge")
end
He’s talking about OFFICIAL ROBLOX BADGES. Not game badges.
I actually thought it was the id of Administrator Badge lol
If Roblox Badges then you can do like @Deb0rahAliWilliams or @Jumpathy
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.