So I’m making a gamepass where if you buy it, you get a tower except I can’t test this because I already own it automatically, will this work?
MarketService.PromptGamePassPurchaseFinished:Connect(function(playerWhoPurchased, id, wasPurchased)
if wasPurchased == true and playerWhoPurchased and data[playerWhoPurchased.UserId] then
if id == largeScientistID then
table.insert(data[playerWhoPurchased.UserId].OwnedTowers, "Large Scientist Cameraman")
errorEvent:FireClient(playerWhoPurchased,"Success","Thanks for your support!")
end
end
end)