Why can’t it be just player
, not player.UserId
? Look at GamePassService:PlayerHasPass()
. Does it use player.UserId
? No.
This is just a consistency bug I wanted to point out in the API. Not a major thing in general though.
Why can’t it be just player
, not player.UserId
? Look at GamePassService:PlayerHasPass()
. Does it use player.UserId
? No.
This is just a consistency bug I wanted to point out in the API. Not a major thing in general though.
This isn’t a bug. BadgeService has been around for much longer than GamePassService and MarketplaceService combined. You have to supply a userId because that’s just how Roblox made it originally, and now obviously they can’t change it without breaking all of the scripts using it.
They could make it a Variant<int, Player> so that you can also feed a Player object (or just make it Player in the documentation but also accept integers for legacy reasons), but there probably isn’t a whole lot of motivation to do so.