Prompt Purchase isn't working?
both in studio and in game it says the same thing "This item is currently not for sale"
i'm trying to sell clothing assets in game.
02 | rs = game:GetService( "ReplicatedStorage" ) |
03 | player = game:GetService( "Players" ).LocalPlayer |
04 | mouse = player:GetMouse() |
06 | pp = remotes:WaitForChild( "Prompt_Purchase" ) |
07 | mouse.Button 1 Up:connect( function () |
08 | if mouse.Target.Name = = "Purchase_Button" then |
09 | local property = mouse.Target.Parent.Parent.Figure:FindFirstChild(mouse.Target:FindFirstChildOfClass( "StringValue" ).Name) [ mouse.Target:FindFirstChildOfClass( "StringValue" ).Name.. "Template" ] |
10 | local str = tostring (property) |
11 | local num = tonumber (str:match( "%d+" )) |
17 | rs = game:GetService( "ReplicatedStorage" ) |
19 | pp = remotes:WaitForChild( "Prompt_Purchase" ) |
20 | pp.OnServerEvent:connect( function (player, id) |
21 | print (player.Name.. ", " ..id) |
22 | game:GetService( "MarketplaceService" ):PromptPurchase(player, id) |