This script will not prompt the player, although if i run the server script in the command bar it works

Server Script

rep.prompt.OnServerEvent:Connect(function(player)

local MarketplaceService = game:GetService("MarketplaceService")

local ProductId = 506263839

MarketplaceService:PromptProductPurchase(player, ProductId)

end)

Local Script

script.Parent.MouseButton1Click:Connect(function()

local id = script.Parent.Parent.theuid

game.ReplicatedStorage.Request:FireServer(id.Text)

end)

10 comments

0

you are not waiting for the promtproductpurchase, you need to do that to my knowledge

0

no ^

0

? Why would you need to, it is an event

0

Also, can you provide extra information, like what is id.Text? and why isn't there a variable for it on the server script?

0

I've waited and doesn't work

0

the id.Text was a variable i forgot to delete, it has no use to why the problem is occuring

0

@Gameplayer365247v2 Cut it out with the bad answers.

0

I'd like to say, im not smart Request and prompt different events

0

but still doesent work ;/

0

So you’re firing the “Request” event on the client, but the server script is listening to the “prompt” event? (assuming “rep” is ReplicatedStorage) I think your server script is using the wrong event.