I am making a gamepass and I need to know how to add fire to the player after they have purchased it. I need to add the fire after the last if isPurchased then.
Also tell me what I need to add to make it work smoothly.
local passId = 932281642 --change this to your GamePass Id
local marketplaceService = game:GetService("MarketplaceService")
marketplaceService.PromptPurchaseFinished:connect(function(player,assetId,isPurchased)
if isPurchased then --if the player did pay
if assetId == passId then --if what they bought is the pass
print(player.Name .. " bought the pass (" .. passId .. ")")
if isPurchased then
end
end
end
end)
But then someone said to do this... and it didn't work.
local passId = 932281642 --change this to your GamePass Id
local marketplaceService = game:GetService("MarketplaceService")
marketplaceService.PromptPurchaseFinished:connect(function(player,assetId,isPurchased)
if isPurchased then --if the player did pay
if assetId == passId then --if what they bought is the pass
print(player.Name .. " bought the pass (" .. passId .. ")")
if isPurchased then
local fireMe = Instance.new("Fire",player.Character.Torso)
end
end
end)

2 comments
I'll try
That didn't work