So I have this script that allows players to purchase things by clicking on a gui. I just wanna know some things in the code that I have absolutely no sense of.
itemID= 123456789
player = script.Parent.Parent.Parent.Parent
function Purchase()
Game:GetService("MarketplaceService"):PromptPurchase(player, itemID)
end
script.Parent.MouseButton1Down:connect(Purchase)
The second line is the first thing. Why do we need multiple parents? I'm just so confused on this script altogether and I would like it if someone went trough it step by step.
