Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[SOLVED]Script will not prompt the player?

Asked by
danglt 185
5 years ago
Edited 5 years ago

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)
0
you are not waiting for the promtproductpurchase, you need to do that to my knowledge Gameplayer365247v2 1055 — 5y
0
no ^ DeceptiveCaster 3761 — 5y
0
? Why would you need to, it is an event theking48989987 2147 — 5y
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? theking48989987 2147 — 5y
View all comments (6 more)
0
I've waited and doesn't work danglt 185 — 5y
0
the id.Text was a variable i forgot to delete, it has no use to why the problem is occuring danglt 185 — 5y
0
@Gameplayer365247v2 Cut it out with the bad answers. DeceptiveCaster 3761 — 5y
0
I'd like to say, im not smart Request and prompt different events danglt 185 — 5y
0
but still doesent work ;/ danglt 185 — 5y
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. User#20279 0 — 5y

Answer this question