Hello. My script wont show on the output, knor it wouldnt work! I dont know whats going on as its probably a error with my script. Check it out:
local mps = game:GetService("MarketplaceService")
local ProximityPrompt = script.Parent
ProximityPrompt.Triggered:Connect(function()
mps.ProcessReceipt = function(purchaseInfo)
local plr = game:getService("Players"):GetPlayedByUserId(purchaseInfo.PlayerId)
if purchaseInfo.ProductID == 1164763860 then
print("Test")
elseif purchaseInfo.ProductId == 1164763860 then
print("Test.")
end
end
end)
If there is anything wrong with my script, please let me know
local mps = game:GetService("MarketplaceService")
local ProximityPrompt = script.Parent
ProximityPrompt.Triggered:Connect(function()
print("Triggered Prompt")
mps.ProcessReceipt = function(purchaseInfo)
print("Processing receipt")
local plr = game:getService("Players"):GetPlayerByUserId(purchaseInfo.PlayerId)
if purchaseInfo.ProductId == 1164763860 then
print("Test")
elseif purchaseInfo.ProductId == 1164763860 then
print("Test.")
else
print("Not a valid Product ID?")
end
end
end)
It did print something on the output (“triggered prompt”) however prompt didnt appear, do I need to enable anything?/do prompts only appear in-game?
mps.ProcessReceipt = function(purchaseInfo)
local plr = game:getService("Players"):GetPlayedByUserId(purchaseInfo.PlayerId)
if purchaseInfo.ProductID == 1164763860 then
print("Test")
elseif purchaseInfo.ProductId == 1164763860 then
print("Test.")
end
end
In a server script, and make sure it’s not inside the ProximityPrompt Event.