RPD777
|
  |
| Joined: 31 May 2016 |
| Total Posts: 121 |
|
|
| 13 Jul 2017 12:07 PM |
I have made food items, but instead of colliding into them and then appearing in your backpack, I would like to be able to click on my food item instead and then it appears in my backpack. I can't seem to find anything about it and I can't figure out how to do it. Any help would be hugely appreciated.
- RPD777 |
|
|
| Report Abuse |
|
|
Alend43
|
  |
| Joined: 13 Nov 2013 |
| Total Posts: 451 |
|
| |
|
| |
|
RPD777
|
  |
| Joined: 31 May 2016 |
| Total Posts: 121 |
|
|
| 13 Jul 2017 12:41 PM |
| Yes, I know, but do you know how to script it |
|
|
| Report Abuse |
|
|
RobuxLife
|
  |
| Joined: 19 Sep 2012 |
| Total Posts: 13336 |
|
|
| 13 Jul 2017 12:41 PM |
You would use the click detectors MouseClick event, then do something like script.Parent.Parent = playerwhoclicked
|
|
|
| Report Abuse |
|
|
RPD777
|
  |
| Joined: 31 May 2016 |
| Total Posts: 121 |
|
|
| 13 Jul 2017 12:42 PM |
| ok, thank you, I will give it a try |
|
|
| Report Abuse |
|
|
RPD777
|
  |
| Joined: 31 May 2016 |
| Total Posts: 121 |
|
|
| 13 Jul 2017 12:44 PM |
| ok, but how do I clone it to your backpack. You click the item, then it clones to your backpack |
|
|
| Report Abuse |
|
|
RobuxLife
|
  |
| Joined: 19 Sep 2012 |
| Total Posts: 13336 |
|
|
| 13 Jul 2017 12:49 PM |
Oh, you want it to clone?
local clickDetector = script.Parent local tool = script.Parent.Parent
clickDetector.MouseClick:connect(function(player) local clonedtool = tool:Clone() clonedtool.Parent = player.Backpack end)
Here is my setup in Workspace:
Tool ClickDetector Script
|
|
|
| Report Abuse |
|
|
RPD777
|
  |
| Joined: 31 May 2016 |
| Total Posts: 121 |
|
|
| 13 Jul 2017 12:59 PM |
| Thank you so much RobuxLife, you saved my day. I can't thank you enough |
|
|
| Report Abuse |
|
|
RobuxLife
|
  |
| Joined: 19 Sep 2012 |
| Total Posts: 13336 |
|
| |
|
|
| 02 Dec 2017 10:46 PM |
| I need raw burger meat that I can cook and then buns i can put the put the cooked burger meat. |
|
|
| Report Abuse |
|
|