local id = 5429801
game.Players.PlayerAdded:Connect(function(player)
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player, id) then
print(player.Name .. " has the game pass!")
else
print(player.Name .. " doesn't have the game pass...")
end
end)
I have an error in the output saying this
19:25:42.103 - Unable to cast Instance to int64
19:25:42.104 - Stack Begin
19:25:42.104 - Script 'ServerScriptService.Script', Line 4
19:25:42.104 - Stack End
I was wondering if someone could tell me how to fix it and why

1 comment
By the way i used the script from the wiki but i have an script that is very long but i wanna see people's answers with small script