I am trying to make a builders club memorial game. As part of that I want to recognize those who have once been a member of builders club. Currently, the only way I know how to do this would be to search through a players inventory for a hard hat of any kind (be it Regular Builders, Turbo, or Outrageous). Furthermore, I am unable to even retrieve roblox badges from a players profile, so I can’t even recognize those who once had any type of builders club.
I haven’t found anything that would allow me to search through a player’s hats or accessories if they’re not wearing it currently.
While an answer to how to search through a players inventory is preferred, I will also be happy with any information regarding how to check a users former Builders Club status.
Have you tried using BadgeService?
You could use MarketplaceService:UserOwnsAsset when the player joins the game to see if they own any of the Builders Club hats.
The AssetId’s for the Builders Club hats are
- 17408283 for the OBC hat
- 11844853 for the TBC hat
- 1080951 for the BC hat
You could implement in like this:
local Players = game:GetService("Players")
local MarketplaceService = game:GetService("MarketplaceService")
local Asset = 63690008 -- The AssetId of the asset to check the ownership of
local PlayerOwnsAsset = MarketplaceService.PlayerOwnsAsset
-- Player joins the game
local success, ownsAsset = pcall(PlayerOwnsAsset, MarketplaceService, player, Asset)
if ownsAsset then
-- insert code that you want to run if the user owns the specified asset
-- insert code that you want to run if the user does not own the specified asset