huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 19 Sep 2012 08:23 PM |
| Ever played one of those games where a tool shows up for a second, then it auto-equips it for you then it disappears and doesn't let you de-select it? How would you do that within a script? |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 19 Sep 2012 08:24 PM |
| Also, it still works, as in like clicking and it still does it's function even though it doesn't show up in your backpack. |
|
|
| Report Abuse |
|
|
|
| 19 Sep 2012 08:26 PM |
Try to make the tool nil? I've always thought of that.
http://www.roblox.com/Forum/ShowPost.aspx?PostID=78459109 --Read that to help you get better help |
|
|
| Report Abuse |
|
|
|
| 19 Sep 2012 08:29 PM |
To autoequip the tool:
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) repeat wait() until player.PlayerGui and char and player char.Humanoid:EquipTool(player.Backpack.ITEMNAME) end) end)
http://www.roblox.com/Forum/ShowPost.aspx?PostID=78459109 --Read that to help you get better help |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 19 Sep 2012 08:31 PM |
| I already got the AutoEquip part, I just needed to figure out the other part. If I changed the tool to nil, wouldn't that stop all scripts within, making them nil aswell? |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 19 Sep 2012 09:07 PM |
| I heard you can put it in the PlayerGui, but it didn't work, so how can I get it to where it can't be deselcted at all, and it doesn't show up in the backpack but still works? |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 19 Sep 2012 09:07 PM |
| Like when you select it, it gets parented to the PlayerGui. |
|
|
| Report Abuse |
|
|
Tenal
|
  |
| Joined: 15 May 2011 |
| Total Posts: 18684 |
|
|
| 19 Sep 2012 09:19 PM |
Yeah, I know what you're talking about. It needs to be a Tool, not a HopperBin. You're going to have to get a tool with a Handle in it and put it in Lighting (or something like that). You can then clone it whenever someone respawns/joins the game, and move the tool to their character for auto equipping. Once it's equipped, parent the Tool into the Player. |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
| |
|
|
| 19 Sep 2012 09:31 PM |
Do you just want the mouse, or do you want to make a Tool auto-equipped and set it to nil? If you want the mouse, use GetMouse():
local Mouse = game.Players.Player:GetMouse()
Just set it to a variable, and you have the mouse! :P Did you ever try getting rid of the mouse? That would probably crash someone's client or server or make the Script break. :P |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
| |
|