Can anyone tell me why I'm having errors. Thank you.
18:30:12.351 - GamePassId '3041549' is not of type Game Pass. Please use MarketplaceService:PlayerOwnsAsset instead.
I'm pretty sure it's a gamepass, https://www.roblox.com/game-pass/3041549/10-Year-Bazooka-First-Day-Release-Sale
Here's the code I'm using as well.
local BazookaID = 3041549 if game:GetService("GamePassService"):PlayerHasPass(Player,BazookaID) then print(Player.Name .. " has the game pass!") else print(Player.Name .. " doesn't have the game pass...") end
Welp GamePassService is now a legacy function and no longer works.
ROBLOX updated how gamepasses work on April so both :PlayerHasPass and :PlayerOwnsAsset won't work anymore.
The newest and current way to get gamepass is game:GetService("MarketPlaceService"):UserOwnsGamePassAsync(userId, gamePassId)
Replace userId with the target's userId and also replace gamePassId with your gamepass's Id
Enjoy!