--local script--
script.Parent.ChildAdded:Connect(function(tool)
game.ReplicatedStorage.RemoteEvent:FireServer(tool)
end)
--server script--
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player, tool)
if tool.ClassName == "Tool" then
tool:Destroy()
end
end)
this script destroys the Tool when its added from the server side but if its added from the client side it gives me this error:
ServerScriptService.btololsscript:2: attempt to index local 'tool' (a nil value)
Stack Begin
Script 'ServerScriptService.btololsscript', Line 2
Stack End

1 comment
local script is in starterpack