|
| 16 Apr 2012 04:46 PM |
Can anyone post how this function is used? like what would i put after this function Im not requested a script, i just need some help on how i would make a tool become Nil,and i never used this function before so i need help |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2012 04:47 PM |
http://wiki.roblox.com/index.php/Selected_(Event)
try that maybe
~Working towards that PSTF..~ |
|
|
| Report Abuse |
|
|
| |
|
|
| 16 Apr 2012 04:52 PM |
| Thanks but thats when its like used, i need it as soon as a player uses it (say hits 1) it starts, not when they hold it . |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2012 05:04 PM |
oh, just use.. if tool.Enabled == true then code.
~Working towards that PSTF..~ |
|
|
| Report Abuse |
|
|
hyyt8
|
  |
| Joined: 02 May 2007 |
| Total Posts: 1760 |
|
|
| 16 Apr 2012 05:07 PM |
| I believe that only works for hopperbins. It'd have to be a Button1Down() for a tool |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2012 05:15 PM |
what i kinda need is function onSelected() code here script.parent:Remove
conection line goes here
Idk how to do the connection line AND how to write the code for a onSelected, i need it go nil BUT still working |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2012 05:17 PM |
http://wiki.roblox.com/index.php/Selected_(Event)
local hop = Instance.new("HopperBin") hop.Parent = game.Players.Player.Backpack local function onSelected() print("HopperBin selected") end hop.Selected:connect(onSelected)
~Working towards that PSTF..~ |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2012 05:18 PM |
For tools:
script.Parent.Equipped:connect(function(mouse) end)
for HopperBins:
script.Parent.Selected:connect(function(mouse) end) |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2012 05:18 PM |
| instance makes a new hopperbin though |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2012 05:19 PM |
| @Raven-- thank you, now are Hopperbins working the same as tools? i mean i never learned that |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2012 05:20 PM |
local hop = YOURHOPPERBIN
local function onSelected() ------CODE------- end hop.Selected:connect(onSelected)
~Working towards that PSTF..~ |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2012 05:20 PM |
HopperBins aren't physical objects. They can be 'used', but doesn't contain handles.
They can be used more or less in the same way, though. With MouseButton1Down and so on ;) |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2012 05:21 PM |
| Ahh im still learning about KeyDown and all that for tools,im hoping to learn tonight,and thank you for all your help |
|
|
| Report Abuse |
|
|