of     1   

Triumphion
#182690879Saturday, January 30, 2016 7:44 PM GMT

So, I made this script and its giving me the error "Argument 2 is missing or nil" Heres my script: local promptService = game:GetService("MarketplaceService") local productID = script.Parent.Parent:FindFirstChild("shirtID.Value") script.Parent.Parent.ClickDetector.MouseClick:connect(function(playerWhoClicked) Game:GetService("MarketplaceService"):PromptProductPurchase(playerWhoClicked.Name, productID) end) | aviator of the forums | aerogod, hourtan | "hell is paved with good intentions" | greatness of gd |
Triumphion
#182690913Saturday, January 30, 2016 7:45 PM GMT

Heres the full console output. 14:43:52.961 - Argument 2 missing or nil 14:43:52.963 - Script 'Workspace..Torso.Script', Line 5 14:43:52.964 - Stack End | aviator of the forums | aerogod, hourtan | "hell is paved with good intentions" | greatness of gd |
MakerModelLua
#182690945Saturday, January 30, 2016 7:45 PM GMT

local productID = script.Parent.Parent:FindFirstChild("shirtID.Value") local productID = script.Parent.Parent:FindFirstChild(shirtID.Value)
Happywalker
#182690956Saturday, January 30, 2016 7:45 PM GMT

local productID = script.Parent.Parent:FindFirstChild("shirtID").Value script.Parent.Parent.ClickDetector.MouseClick:connect(function(playerWhoClicked) game:GetService("MarketplaceService"):PromptProductPurchase(playerWhoClicked, productID) end)
Triumphion
#182691003Saturday, January 30, 2016 7:46 PM GMT

I did that, now its giving me. 14:46:58.786 - Workspace..Torso.Script:3: attempt to index global 'shirtID' (a nil value) | aviator of the forums | aerogod, hourtan | "hell is paved with good intentions" | greatness of gd |
MakerModelLua
#182691026Saturday, January 30, 2016 7:46 PM GMT

local productID = script.Parent.Parent:FindFirstChild("shirtID").Value oops, i thought shirtID was declared. do that instead
Triumphion
#182691078Saturday, January 30, 2016 7:47 PM GMT

14:48:30.122 - Unable to cast value to Object 14:48:30.122 - Script 'Workspace..Torso.Script', Line 5 14:48:30.123 - Stack End | aviator of the forums | aerogod, hourtan | "hell is paved with good intentions" | greatness of gd |
MakerModelLua
#182691444Saturday, January 30, 2016 7:52 PM GMT

You're doing it by their name "playerWhoClicked.Name" Use happy's code: local productID = script.Parent.Parent:FindFirstChild("shirtID").Value script.Parent.Parent.ClickDetector.MouseClick:connect(function(playerWhoClicked) game:GetService("MarketplaceService"):PromptProductPurchase(playerWhoClicked, productID) end)
Triumphion
#182691517Saturday, January 30, 2016 7:54 PM GMT

Ah, thanks very much. | aviator of the forums | aerogod, hourtan | "hell is paved with good intentions" | greatness of gd |

    of     1