Hello all, I was experimenting with DataStores.
I made a game pass, and if a player purchases it, the game will save that player's stage.
If the player does not own the game pass, then the game will not save the player's stage.
My issue is with the line below, and the error it's giving is "Unable to cast Instance to int64"
-- Variables:
local marketplaceService = game:GetService('MarketplaceService')
local saveStageId = 11704094
.
game.Players.PlayerRemoving:Connect(function(player)
if marketplaceService:UserOwnsGamePassAsync(player, saveStageId) then
SavePlayerData(player)
end
end)
I'm not even sure what an int64 is myself, so any help would be great appreciated!
