So Tool.Activated is not working at all here is the script:
local Tool1 = game.StarterPack.Tool1
Tool1.Activated:Connect(function() print("Hello") end)
But it doesnt work in a local script or a server script i honestly have no idea whats happening
You are not referencing the tool that is in the player's backpack.
For this to work, the code should look something like this:
-- LocalScript local Player = game:GetService("Players").LocalPlayer local Backpack = player.Backpack local Tool1 = Backpack.Tool1 Tool1.Activated:Connect(function() print("Hello") end)
Even if this is already answered, I don't recommend getting it from the backpack! If you really wanted to just put the script inside of the tool in the StarterPack
folder. What it does is it will clone the tools inside and put it inside the player's backpack
, which is useful if you don't want to do multiple :WaitForChild()
s. Just thought I'd put it out there for you, don't be afraid to put local scripts INSIDE your tools!