I have a script that clones a HopperBin into a player's Backpack and I want it to be selected in the moment he gets it, automatically, to prevent some errors. How can I do it? and about Tools, how to do the same? (with automatically, I mean without him clicking it)
How can I select a player's HopperBin right when he gets it? [not solved]
2 answers
To do this, I would use the 'Active property of a HopperBin. First, let's reference the target. I'll set it to nil, but you change it to the actual hopperbin.
HopperBin = nil;
Next, let's enable the property :
HopperBin.Active = true;
That should work, but I've never attempted this.
3 comments
No, it doesn't work. Selecting it changes the property, but changing the property nothing happens.
Hmm, I would suggest the ToggleSelect() method, but that is protected so I have no clue. If you find out, please tell me.
:P
game.Players.LocalPlayer.Character.Humanoid:EquipTool(game.Players.LocalPlayer.Backpack.ToolNameHere)
Hope I helped!
6 comments
game.Players.LocalPlayer.Character.Humanoid:EquipTool(game.Players.LocalPlayer.Backpack.ToolNameHere)
I posted the script on a comment because you can't see the answer fully. And since it has LocalPlayer put in localscript Okay?
But it may only work with tools... Though worth a try.
Oh and you can also use UnequipTools to Unequip all tools the player has.
But that only makes the tools go into player backpack, not select them.
No, it makes the player Equip the tool. And no it does not work with Hopperbins. It force equips.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
I think the player has to click it himself i don't think you can automatically select a tool for a player but i'm not sure.
Ow.. that is not good.