game.Players.PlayerAdded:Connect(function(plr)
if game.MarketplaceService:PlayerOwnsAsset(plr, 5397071) then
print("Success, player has asset.")
else
print("Player doesn't own this asset.")
end
end)
Problem is it prints "Player doesn't own this asset" even when a player does have an asset. I made sure ID is correct. (Do not check what is there :P)

3 comments
That's because it's a gamepass id, not asset id. You need to either use GamePassService:PlayerHasPass() or MarketplaceService:UserOwnsGamePassAsync()
GamePassService method is broken and outdated now.
looking at the page of the asset associated with the id, it's not a gamepass