I am scripting some food recipes and I ran into a problem. I couldn't figure out how to get an empty cup into the players inventory. How would I do this: When a player clicks on a certain model, they are given a piece of gear.
✓ ANSWER ACCEPTED
How do make a clone function on click?
1 answer
✓ Accepted answer
Use the MouseClick event on a click detector to connect a function that utilizes ":Clone()" to copy the cup from ServerStorage and parents it into the player's Backpack. The MouseClick event on ClickDetector automatically returns a parameter that is the player who clicked the detector.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
http://wiki.roblox.com/index.php?title=API:Class/ClickDetector
http://wiki.roblox.com/index.php?title=API:Class/Instance/Clone