I’m trying to make a destroy tool but this error pops up:
Client
local player = game:GetService("Players").LocalPlayer
local mouse = player:GetMouse()
local remote = script.Parent:FindFirstChild("Destroy")
script.Parent.Activated:Connect(function()
remote:FireServer(mouse.Target)
end)
Server
local remote = script.Parent:FindFirstChild("Destroy")
remote.OnServerEvent:Connect(function(player, mt)
print("We got here, remote fired.")
mt:Destroy()
end)
Error:
Players.funnyfunns.Backpack.Destroy Tool.ClientHandler:6: attempt to index nil with 'FireServer'