I'm trying to make it so right after I buy the pass, the gear is cloned into my backpack. What am I doing wrong?
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
game:GetService("MarketplaceService"):PromptPurchase(player, 237980461)
if game.MarketplaceService:PlayerOwnsAsset(player, 237980461) then
game.ServerStorage.SegwayHoverboard:Clone().Parent = player.Backpack
player.Backpack.SegwayHoverboard.CanBeDropped = false
game.SoundService.Ding:Play()
end
end)

1 comment
This is under a text button.