After purchasing the gamepass in game "UserOwnsGamePassAsync" always reports not owning the pass

This code is linked to the button that takes you into the game, after customising your character it checks if you have items that require the GamePass, If you do but don’t have the GamePass it tells you.

If the already own the GamePass it works fine and reports “true”, but if you buy the pass in game it always reports “false”.

I don’t really know what else to try.

--// Hasn't got the pass
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(Player.UserId, ItemPackID) then else
		
	--// Show Error
	TweenService:Create(Char_Details.Item_Error, TweenInfo.new(0.05), {TextTransparency = 0}):Play()
	wait(2)
	
	--// Hide Error
	TweenService:Create(Char_Details.Item_Error, TweenInfo.new(0.3), {TextTransparency = 1}):Play()
	wait(0.3) wait()
	
	LoadDebounce = false
	
	return
end

Wouldn’t you want something to check if the player buys the gamepass while in the game, because UserOwnsGamePassAsync usually doesn’t work until the player rejoins, it happens in most games.

1 Like

Ah, I did wonder if thats the case, I guess I’ll just use my existing check for a successful purchase to allow the player to use the items, Thank you.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.