the a player has it and touches something it wont work at all but when he/she drops it and trys to pick it up it works idk whats wrong
script.Parent.Activated:Connect(function() script.Parent.Handle.Script.Disabled = false end)
the script
function onTouch(part) local humanoid = part.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then -- if a humanoid exists, then humanoid.Health = 0 -- damage the humanoid end end script.Parent.Touched:connect(onTouch)
You can then use a remote event to fire to the server the hit.Parent and on the server side set it's Humanoid Health to 0
local tool = script.Parent local player = game.Players.LocalPlayer local function onTouch(hit) local hum = hit.Parent:FindFirstChild("Humanoid") if hum then --Fire a Remote Event to kill hit.Parent [i.e. onKillPlayerEvent:FireServer(hit.Parent)] end end tool.Blade.Touched:Connect(function(hit) onTouch(hit) end)