Gamepass item is not appearing on the inventory of the player

Hi everyone, I did a rainbow carpet gamepass GUI, and then I entered in my test account to play the game and purchase the gamepass through the GUI so that I could test. The thing is, when I purchased it, the item is not appearing on the inventory. I am playing in the test account through the roblox app in my phone.

Script I used

local gamepassId = 800050561
local mps = game:GetService(“MarketplaceService”)

game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
if mps:UserOwnsGamePassAsync(player.UserId,gamepassId) then
script.FlyingCarpet:Clone().Parent = player.Backpack
print(player.Name…" owns the flying carpet gamepass")
end
end)
end)

A screenshot just for in case.


Please help!!

Try changing
This line

script.FlyingCarpet:Clone()

To

game:GetService("ServerStorage").RainbowMagicCarpet:Clone()

Sniped it from the chicken man

1 Like

It worked! Thank you so much! ! !

1 Like