So, i wanted to make this product that gives a Tri-laser to anyone who buys the product. heres my code that i am having trouble with.
local ProductID = 19312479 -- ID of the developer product
if DoAcceptPurchase = true then -- whats wrong with this part? i put "then".
Game.Lightning.Trilaser:Clone()
FirstFindChild "Playername"
Game.Players."playername":Paste() -- i dont really think this will work...
-- @Above, i wanted to make the player who buys the product get it, but i dont know how to do it.
-- i dont know how to make onclick functions or anything.
end
so i don't know if :Paste() is a real function or not. also, the playername thing is not going to work out. i want to find out how i can get the player's name who bought the product and paste it to him/her. i also have a GUI named purchaseproduct in the starterGUI but i don't know how to make an OnClick function to even pull up the screen to purchase the product so im just stuck. any ideas?

1 comment
Main idea: Stop scripting. Never script anything ever again. Don't even try.