Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do make a clone function on click?

Asked by
Jexpler 63
8 years ago

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.

1 answer

Log in to vote
1
Answered by 8 years ago

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.

Ad

Answer this question