Why is this code not working (It should be working):
Tool = script.Parent function equip() print("Equipped") end function unequip() print("Unequipped") end script.Parent.Equipped:connect(equip) script.Parent.Unequipped:connect(unequip)
In script: StarterPack (StarterPack) Tool (Tool) OnEquiped (LocalScript)
When I equip the tool, I want to print the message "Equipped" to the Output. This for some weird reason does not seem to work.
The tool has to have a Handle. It doesn't fire Equpped
and Unequipped
without it.
If you don't want a handle, then use a HopperBin.
Update: The following code (Executed through the console, while running the game in test mode) doesn't work either:
x = Instance.new("Tool") x.Parent = game.Players.Player1.Backpack x.Equipped:connect(function()print(":D")end)