rjh25
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 41 |
|
|
| 22 Aug 2012 03:13 PM |
| How do I make a GUI pop-up when you select a tool? Ex. Tool=backpack, inventory GUI opens when selected. |
|
|
| Report Abuse |
|
|
|
| 22 Aug 2012 03:14 PM |
Equipped event > Clones Gui
† KMXD † |
|
|
| Report Abuse |
|
|
jmr11b
|
  |
| Joined: 19 Aug 2010 |
| Total Posts: 806 |
|
|
| 22 Aug 2012 03:14 PM |
| Use onselected and copy a gui in Lighting into the players PlayerGui. |
|
|
| Report Abuse |
|
|
jmr11b
|
  |
| Joined: 19 Aug 2010 |
| Total Posts: 806 |
|
|
| 22 Aug 2012 03:14 PM |
| Sorry, Knightmare is right. |
|
|
| Report Abuse |
|
|
rjh25
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 41 |
|
|
| 22 Aug 2012 03:15 PM |
How do I use "Equipped event" in a script?
Idea: on equipped: clone inventoryGUI
Is that right? |
|
|
| Report Abuse |
|
|
|
| 22 Aug 2012 03:17 PM |
Assuming the script is a child of the tool:
script.Parent.Equipped:connect(function() --Clone gui end)
† KMXD † |
|
|
| Report Abuse |
|
|
rjh25
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 41 |
|
|
| 22 Aug 2012 03:19 PM |
| Do I have to use a tool or hopperbin? |
|
|
| Report Abuse |
|
|
|
| 22 Aug 2012 03:20 PM |
Tool for that specific event, though if you want to use a Hopperbin, replace "Equipped" with "Selected".
† KMXD † |
|
|
| Report Abuse |
|
|
rjh25
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 41 |
|
|
| 22 Aug 2012 03:21 PM |
Here's what I have:
print 'Inventory Ready' script.Parent.Equipped:connect(function(clone "Inventory GUI") --Clone gui end)
|
|
|
| Report Abuse |
|
|
|
| 22 Aug 2012 03:23 PM |
That's what I gave you, but with useless crap... Here, put this in a LocalScript, inside the tool. Put the GUI in the tool, too.
local GuiName = "NameOfTheGui" --Put the name here, kk?
script.Parent.Equipped:connect(function() script[GuiName]:Clone().Parent = Game.Players.LocalPlayer.PlayerGui end)
† KMXD † |
|
|
| Report Abuse |
|
|
rjh25
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 41 |
|
|
| 22 Aug 2012 03:27 PM |
thank you
Sorry, I'm bad with scripts |
|
|
| Report Abuse |
|
|
rjh25
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 41 |
|
|
| 23 Aug 2012 02:02 PM |
| The open script worked, thank you. But, I don't know how to make the GUI disappear when the tool is unselected. |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2012 02:25 PM |
local GuiName = "NameOfTheGui" --Put the name here, kk? script.Parent.Equipped:connect(function() script[GuiName]:Clone().Parent = Game.Players.LocalPlayer.PlayerGui end) script.Parent.Unequipped:connect(function() pcall(function() Game.Players.LocalPlayer.LocalGui[GuiName]:Destroy() end) end)
¤¤†KMXD†¤¤ |
|
|
| Report Abuse |
|
|
rjh25
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 41 |
|
|
| 23 Aug 2012 03:20 PM |
| Thank you, I'll update the script and like I said before, I'm bad at scripting, but I'll practice. |
|
|
| Report Abuse |
|
|