Backpack Tool issues

Hello :wave:,

I am trying to create a local script that fires an event with some information passed through it. However, I have come across a problem, when I try to get the tool from the backpack I keep getting errors.

local player = game:GetService("Players").LocalPlayer
local mouse = player:GetMouse()
local tool = player:WaitForChild("Backpack"):FindFirstChild("PickAxe")

tool.Activated:Connect(function()
	
	game:GetService("ReplicatedStorage"):WaitForChild("DestroyEvent"):FireServer(mouse.Target, tool)
	
end)

Just wondered if I am doing anything wrong, any help is appreciated :smile:.

What error do you get?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.