of     1   

Notunknown99
#64282668Tuesday, March 13, 2012 10:06 PM GMT

I really need to be able to force players to select HopperBins and, if failing that, Tools (The tool, however, must not be visible) My current script for doing it is this (Uses a tool but fails to work) local tool = script.Parent.Tool tool.Equipped:connect(function(mouse) print("It.. worked!") mouse.Icon = "http://www.roblox.com/asset/?id=73087677" tool:Destroy() end) tool.Parent = script.Parent.Parent.Character
NewFissy
#64285902Tuesday, March 13, 2012 10:49 PM GMT

So... Um what's wrong with the script. Do you want it to disappear? Or is it not working at all?
Notunknown99
#64286353Tuesday, March 13, 2012 10:56 PM GMT

It fires the Equipped event but immediatly sets the Mouse to Inactive (The hopperbin is deleted)
ZakaryyzHD
#64290118Tuesday, March 13, 2012 11:49 PM GMT

local tool = script.Parent.Tool tool.Equipped:connect(function(mouse) print("It.. worked!") mouse.Icon = "http://www.roblox.com/asset/?id=73087677" tool:remove() end) tool.Parent = script.Parent.Parent.Character Use that.
Notunknown99
#64316784Wednesday, March 14, 2012 4:23 PM GMT

How will changing Destroy to Remove help?
SDuke524
#64318178Wednesday, March 14, 2012 5:17 PM GMT

> tool.Parent = script.Parent.Parent.Character Once you `:Destroy()` an instance, it becomes RbxLocked so that you can't reparent it and all things connected to it are disconnected. If you want to reparent, use `:remove()` or `.Parent=nil` but remember if you use `:remove()` you will lose access to all of the children of the hopperbin.
robocorp
#64318950Wednesday, March 14, 2012 5:44 PM GMT

That's what I don't like about the "improved" remove, Destroy() it locks the parent property, so you cant recover it, they need to take out the depreciation of it, they are completely different.
darkkiller5555
#64319926Wednesday, March 14, 2012 6:15 PM GMT

@robocorp; :Remove() accomplishes the same as .Parent = nil
SDuke524
#64320843Wednesday, March 14, 2012 6:40 PM GMT

@dark No it isn't.
Notunknown99
#64323802Wednesday, March 14, 2012 7:47 PM GMT

@SDuke: The tool.Parent = script.Parent.Parent.Character part is before the tool gets destroyed. I have seen this done before...

    of     1