#Potions Error

45 messages · Page 1 of 1 (latest)

white whale
#

You forgot the most important step

misty anvil
#

What was it

white whale
#

unless you have it in another script

misty anvil
#

Oh my gosh

#

I did game.MarketplaceServicd

#

Service

#

Wait

white whale
#

lol

misty anvil
#

But I already got the player

white whale
#

But u didnt add marketplaceservice so it couldnt connect to the marketplace

misty anvil
#

Do I needa do game.Players.MarketPlaceService)

#

?*

#

I’m cofnused

white whale
#

Yes you do

misty anvil
#

I’ll try ig

#

So game.Players.MarketPlaceService.ProcessReceipt = function(receiptInfo)

white whale
#

no

#

local MarketplaceService = game:GetService("MarketplaceService")

#

Did you add that?

misty anvil
#

No cause all I had to do was game.MarketplacrService

#

It’s already in the code

mellow scarab
#

the error tells you your exact issue

#

Can only register ProcessReceipt call back on server

#

also you are trying to overwrite the processreceipt function

#

which is another issue

misty anvil
#

How should I write it

mellow scarab
#

read devfourms

#

i know how to fix this but you wouldn’t learn if i did it for you

#

read about marketplace service and connect functions

misty anvil
#

Alright

#

It’s not a complex error right?

mellow scarab
#

no it’s not

misty anvil
#

Alright at first I thought it meant u#I had to publish and actually play the game on the server but I’m finna hop on the forum

misty anvil
#

@mellow scarab I look up marketplace service on dev forum and all I see is people needing help

#

Can u just help me with this script like guide me or something pls

mellow scarab
misty anvil
#

Alrigjt

#

But I watched a yt tutorial and the code is the exact same

misty anvil
#

@mellow scarab would it be better to write it like this ```lua
game.MarketplaceService:PromptProductPurchase(game.Players.LocalPlayer, ID)

#

instead of writing all of that other stuff

mellow scarab
#

yea

misty anvil
#

Bruh