Answered by
4 years ago Edited 4 years ago
Just change a few things..
1 | local Tool = script.Parent |
3 | Tool.Activated:Connect( function () |
7 | Tool.Deactivated:Connect( function () |
8 | print (“awww man I so sad”) |
You needed to actually connect the event to the function, hints :Connect.
Though I've been testing, and that didn't work for me? But, if you run into any problems, use this, the script that worked for me. (this code is a localscript, child of the tool)
1 | local tool = script.Parent |
3 | if tool.Parent = = game.Players.LocalPlayer.Backpack then |
5 | elseif tool.Parent = = game.Players.LocalPlayer.Character then |
9 | tool.AncestryChanged:Connect(check) |
There you go! 2 ways to do it! Good luck on whatever you're doing!