Hi everyone!
I was making a thing that is supposed to give you an item when you buy the gamepass. I use a script that puts another script inside however many image labels (buyable gamepasses) there are in the gui. The image label has values called "Gamepass ID", and "Price", a text label called "ItemName", and a text button called "Buy". Here is the script that is supposed to be inside the text button"
isInAdjusts = script.Parent.Name == "Adjusts"
ms = game:GetService("MarketplaceService")
if isInAdjusts == false then
image = script.Parent.Parent
price = image:FindFirstChild("Price")
gamepassID = image:FindFirstChild("Gamepass ID")
image.Buy.Text = tostring(price.Value) .. " RS"
script.Parent.MouseButton1Click:Connect(function()
ms:PromptGamePassPurchase(game.Players.LocalPlayer, gamepassID.Value)
end)
end
The script works, but the market place service never actually thinks you have it, so you can rebuy it (you can buy it once, and if you click it again, you have the option to buy it again for some reason). Because of this, another script that is supposed to give you the item, doesnt (because the "UserOwnsGamePassAsync" always returns false). Can someone help?
Any help is appreciated.

1 comment
another thing i would like to mention is that i do not own the gamepass, probably bc this is a group game. i dont know if this is the reason but i would like to point that out