|
| 25 Apr 2016 06:21 PM |
Does not print anything but the developer product purchase goes through, also does not give the points.
Heirarchy;
Script (ServerScript) -Products (Folder) --30985112 (IntValue w/ value of 500) (name = ID, value = points given)
local MarketplaceService = game:GetService("MarketplaceService") local products = script:WaitForChild("Products")
local function getProduct(id) for i,v in pairs(products:GetChildren()) do if v.Name == tostring(id) then return v.Value end end end
MarketplaceService.ProcessReceipt = function(receiptInfo) for i,player in pairs(game.Players:GetPlayers()) do print("-----------------------------") print(player) if player.UserId == receiptInfo.PlayerId then print("this is him") local pts = getProduct(receiptInfo.ProductId) print("pts:"..tostring(pts)) if pts then print"yep" player:WaitForChild("leaderstats") player.leaderstats.Value = player.leaderstats.Value + pts print"done" return Enum.ProductPurchaseDecision.PurchaseGranted end break end end end
Instance.new("BodyThrust",SenseiWarrior).position = CFrame.new(SenseiWarrior,YourGirlsDMs) |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2016 06:27 PM |
now this function doesnt even run
MarketplaceService.ProcessReceipt = function(receiptInfo)
Instance.new("BodyThrust",SenseiWarrior).position = CFrame.new(SenseiWarrior,YourGirlsDMs) |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2016 06:30 PM |
| is this script enabled? lol only thing i can think of |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2016 06:32 PM |
it is :(
Instance.new("BodyThrust",SenseiWarrior).position = CFrame.new(SenseiWarrior,YourGirlsDMs) |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2016 06:40 PM |
i added a print at the start and it didnt work this script itself doesnt run
Instance.new("BodyThrust",SenseiWarrior).position = CFrame.new(SenseiWarrior,YourGirlsDMs) |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2016 06:49 PM |
lol so i was kinda right
try moving the script to workspace? |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2016 06:50 PM |
it works in studio but not online and theres nothing that should change when going from studio to online
Instance.new("BodyThrust",SenseiWarrior).position = CFrame.new(SenseiWarrior,YourGirlsDMs) |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2016 06:51 PM |
| how do dev products even work in studio? |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2016 06:53 PM |
i mean the script runs in studio (actually prints whats on the first line of the script) but online it doesnt print anything, not even the very first line of the script
Instance.new("BodyThrust",SenseiWarrior).position = CFrame.new(SenseiWarrior,YourGirlsDMs) |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2016 07:00 PM |
| did u try putting the script in workspace and did that work? |
|
|
| Report Abuse |
|
|