Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I select a player's HopperBin right when he gets it? [not solved]

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)

2 comments

0

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.

0

Ow.. that is not good.

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

0

No, it doesn't work. Selecting it changes the property, but changing the property nothing happens.

0

Hmm, I would suggest the ToggleSelect() method, but that is protected so I have no clue. If you find out, please tell me.

0

:P

game.Players.LocalPlayer.Character.Humanoid:EquipTool(game.Players.LocalPlayer.Backpack.ToolNameHere)

Hope I helped!

6 comments

0

game.Players.LocalPlayer.Character.Humanoid:EquipTool(game.Players.LocalPlayer.Backpack.ToolNameHere)

0

I posted the script on a comment because you can't see the answer fully. And since it has LocalPlayer put in localscript Okay?

0

But it may only work with tools... Though worth a try.

0

Oh and you can also use UnequipTools to Unequip all tools the player has.

0

But that only makes the tools go into player backpack, not select them.

0

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.