An item being awarded after it has been purchased (red balloon
The item (red balloon) isn’t being awarded after purchase
I’ve looked at another post similar to this and didn’t fine any answers (that or I’m not taking them correctly)
1 Like
Heres the script local MPS = game:GetService(“MarketplaceService”)
local Players = game:GetService(“Players”)
local ID = 18983806
local function Spawned(Player)
local HasGamepass = false
local success, whoops = pcall(function()
HasGamepass = MPS:UserOwnsGamePassAsync(Player.UserId, ID)
end)
if success and HasGamepass then
local Tool = game.ServerStorage.RedBalloon:Clone()
Tool.Parent = Player.Backpack
local StarterTool = game.ServerStorage.RedBalloon:Clone()
StarterTool.Parent = Player.StarterGear
else
warn("Checking if the Player has a Gamepass, more info: ", whoops)
end
end
MPS.PromptGamePassPurchase:Connect(function(Player, ID, PurchaseCheck)
if PurchaseCheck == true then
local Tool = game.ServerStorage.RedBalloon:Clone()
Tool.Parent = Player.Backpack
local StarterTool = game.ServerStorage.RedBalloon:Clone()
StarterTool.Parent = Player.StarterGear
else
warn("Something unexpectedly happened while detecting the purchase to the player")
end
end)
Players.PlayerAdded:Connect(Spawned)
2 Likes
Nevermind got the anwser a while ago
What was the solution that you found to this? I am struggling to find a solution to this as well. Thanks.
1 Like