Am I doing something wrong here? I enabled 3rd party sales and did exactly what you did but it doesnt seem to work? I have added everything perfectly but its not working? How do I fix it?
It is not working, did I do something wrong?
Is something missing?
Ho, ho, calm down my guy. Donât be so worried, weâre all here to help you and make you better so you can extend your capabilities and help us later in our lives. Have you entered a correct id? You can use @lluckvy 's method to check if its a number, make sure you paste or write the code in the event.
local MPS = game:GetService('MarketPlaceService')
script.Parent.MouseButton1Click:Connect(function()
local Input = script.Parent.Parent.Textbox.Text
local NumberedString = tonumber(Input)
if NumberedString and type(NumberedString) == 'number' then
MPS:PromptPurchase(game.Players.LocalPlayer, NumberedString)
end
end)
Can you show me a video of what is happening and show me the errors?
You should tell him to use the command line and the output more, it will help him identify errors and stuff.
I can see the issue, let me explain.
Make sure it says script.Parent.Parent.Text
You just need to remove the .TextBox part
Let me fix it on my previous post so no one gets the same issue.
When I enter an ID and press the button to get the purchase prompt it does nothing
try putting print statements before everything to check if everything is working.
I didnât notice that, you have the eyes of an eagle, my guy.
It wont respond. Does it not work with hat IDâs?
It doesnât, it only works with shirts, pants and T-shirts, you will need something more advanced for that.
No, the line should look like this;
local input = script.Parent.Parent.Text
Then you are done.
local MarketplaceService = game:GetService('MarketplaceService')
local Player = game:GetService('Players').LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
local textbox = script.Parent.Parent
local number = tonumber(textbox.Text)
if number then
MarketplaceService:PromptPurchase(Player,number)
end
end)
What? I didnt even see it! How much do you even analyze, youâre literally better at analyzing than me.
There is an issue in your code.
It should be script.Parent.Parent.Text
local textbox = script.Parent.Parent.Parent.Textbox
he specified âtextâ at the prompt line, he should remove that so it can work with what you said.
No problem!
@MeltedSalami Make sure to check the answer as solution so other players know it is correct.