jaredmai
|
  |
| Joined: 08 Sep 2011 |
| Total Posts: 395 |
|
| |
|
jaredmai
|
  |
| Joined: 08 Sep 2011 |
| Total Posts: 395 |
|
| |
|
|
| 14 Feb 2014 10:46 PM |
A Tool or a HopperBin?
With tools you just set the parent of the tool to the player's character whenever it's unequipped.
But this just isn't possible with a HopperBin. |
|
|
| Report Abuse |
|
|
jaredmai
|
  |
| Joined: 08 Sep 2011 |
| Total Posts: 395 |
|
|
| 14 Feb 2014 11:48 PM |
Its a tool, this is the script... The first part works but the function doesn't
script.Parent.Parent.Character.Humanoid:EquipTool(script.Parent.Flashlight)
function Unequip() script.Parent.Parent.Character.Humanoid:EquipTool(script.Parent.Flashlight) end script.Parent.Flashlight.Unequipped:connect(Unequip) |
|
|
| Report Abuse |
|
|
Hazania
|
  |
| Joined: 04 Jun 2010 |
| Total Posts: 1344 |
|
|
| 14 Feb 2014 11:52 PM |
Instead of Unequipped:connect, try Unselected:connect
~ I may be wrong but oh well :P |
|
|
| Report Abuse |
|
|
jaredmai
|
  |
| Joined: 08 Sep 2011 |
| Total Posts: 395 |
|
|
| 14 Feb 2014 11:57 PM |
| Well the is no event called Unselected... Unequiped is the right event I just can't seem to figure out why it isn't working... |
|
|
| Report Abuse |
|
|
Hazania
|
  |
| Joined: 04 Jun 2010 |
| Total Posts: 1344 |
|
|
| 14 Feb 2014 11:58 PM |
| Meant Deselected* my bad.. http://wiki.roblox.com/index.php/Deselected_(Event) |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2014 12:00 AM |
Hmmm put in localscript,and do this maybe?:
plr = game.Players.LocalPlayer tool = script.Parent tool.Unequipped:connect(function() tool.Parent = plr.Character end)
Tell me if it works :3 |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2014 12:01 AM |
| If mine doesn't work,nvm,try the deselected.. |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2014 12:05 AM |
In the tool put this script
if tool.Parent == game.Players.LocalPlayer.Backpack -- Assuming tool is defined tool.Parent = game.Players.LocalPlayer.Character end
--LocalScript |
|
|
| Report Abuse |
|
|
jaredmai
|
  |
| Joined: 08 Sep 2011 |
| Total Posts: 395 |
|
|
| 15 Feb 2014 12:08 AM |
Wow very strange error I just got from output using your script... It activated because the error happened when I Unequiped the tool... Heres the error: 00:05:33.588 - Something unexpectedly tried to set the parent of Flashlight to Player1 while trying to set the parent of Flashlight. Current parent is Backpack.
--Heres the strange thing... I have nothing else trying to set the parent of that tool |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2014 12:09 AM |
| let me check back on my script in my game i've made it has an auto-equip |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2014 12:10 AM |
| There is, the one when you unequip it. It'll have it's parent set to Backpack instead of the Character. |
|
|
| Report Abuse |
|
|
shonclub
|
  |
| Joined: 05 Sep 2009 |
| Total Posts: 1331 |
|
|
| 15 Feb 2014 12:13 AM |
Tools are equipped when the parent is the player so...
What the other guy said should work
plr = game.Players.LocalPlayer tool = script.Parent tool.Unequipped:connect(function() tool.Parent = plr.Character end) |
|
|
| Report Abuse |
|
|
jaredmai
|
  |
| Joined: 08 Sep 2011 |
| Total Posts: 395 |
|
|
| 15 Feb 2014 12:14 AM |
| Andrew your script messed up the welds on the flashlight I don't even know how... |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2014 12:14 AM |
Tool = script.Parent Player = game.Players.LocalPlayer Character = Player.Character
while wait() do if Tool.Parent == Player.Backpack then Tool.Parent = Character end end |
|
|
| Report Abuse |
|
|
jaredmai
|
  |
| Joined: 08 Sep 2011 |
| Total Posts: 395 |
|
|
| 15 Feb 2014 12:20 AM |
| Andrew's is working :) Thanks andrew I was getting really confused at why it wasn't working. |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2014 12:22 AM |
| Your welcome, i said i had a script that did that in my game as i needed one so your welcome |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2014 12:22 AM |
@andrew Wouldn't my script(posted above) Do the same thing..??
plr = game.Players.LocalPlayer tool = script.Parent tool.Unequipped:connect(function() tool.Parent = plr.Character end) |
|
|
| Report Abuse |
|
|
jaredmai
|
  |
| Joined: 08 Sep 2011 |
| Total Posts: 395 |
|
|
| 15 Feb 2014 12:22 AM |
| Now does anyone know how to remove the tool button at the bottom without removing the welds? |
|
|
| Report Abuse |
|
|
shonclub
|
  |
| Joined: 05 Sep 2009 |
| Total Posts: 1331 |
|
|
| 15 Feb 2014 12:24 AM |
| game.StarterGui:SetCoreGuiEnabled("Backpack", false) |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2014 10:25 PM |
| island sorry for late reply but that would not work because when unequipped is fired it doesn't hit the backpack straight away |
|
|
| Report Abuse |
|
|
| |
|