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

Tool.Activated is not working at all?

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

2 answers

✓ Accepted answer

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)

8 comments

0

thanks!!!

0

No problem!

0

wait its not working and im in a local script and i copied it and everything

0

and its not giving me any errors

0

This is definitely a solution, though you can also just put the script(s) in a tool, or if you wanted to be fancy do a for loop and reference all of them through one script!

0

the backpack script isnt working and i cant use script.Parent because i am trying to get the tool from a differenent part is there another way

0

Get the path to the tool.

0

How???

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!

This discussion is preserved as it was. New answers, comments, and votes are closed.