|
| 25 Apr 2016 02:25 PM |
So I am trying to make a trash can but I need to put a script in it to do this:
When you walk against the trash can, a gui comes up asking if you want to recycle your inventory. Then there should be a yes or no button and if you click no the gui goes away and if you click yes everything in your inventory goes away. Could someone tell me how to do this please? I think its part scripting and part with guis but if somebody could help that'd be great. |
|
|
| Report Abuse |
|
|
WolfRazer
|
  |
| Joined: 17 Jan 2013 |
| Total Posts: 127 |
|
|
| 25 Apr 2016 02:29 PM |
| Shall I make it for you? (No design, you can edit that later) Or tell you how to make it yourself? (More beneficial in the long run) |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2016 02:33 PM |
| Could you make it for me please? Id appreciate that. I can add you to team create and you can do it whenever. I will send the link to the place. |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2016 02:43 PM |
| or you can make it in your place then make it into a model |
|
|
| Report Abuse |
|
|
WolfRazer
|
  |
| Joined: 17 Jan 2013 |
| Total Posts: 127 |
|
|
| 25 Apr 2016 04:43 PM |
| Lets teamcreate so we can chat at the same time, tomorrow. |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2016 06:41 PM |
| Alright. Send me a message when you want. |
|
|
| Report Abuse |
|
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 25 Apr 2016 06:52 PM |
Put the gui in ReplicatedStorage and this script inside the trashcan
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild"Humanoid" then c=game.ReplicatedStorage.YOURGUINAME:Clone() c.Parent=player.PlayerGui end end)
Then just make it so that when you click yes this runs
for i,v in pairs(player.Backpack:GetChildren()) do v:Destroy() end
and if they choose no, just close the gui and do nothing. |
|
|
| Report Abuse |
|
|
|
| 26 Apr 2016 05:58 PM |
| Thanks you! I will try it. |
|
|
| Report Abuse |
|
|