How would I create a script inside a tool where when the tool is activated, it checks if a model has touched the handle inside the script and damage the humanoid?
Well, at first, this would be a bad script, because it would hurt the guy who picks it up.
If it’s given from a tool giver then it’s alright.
I would do it like that:
script.Parent.Activated:Connect(function()
script.Parent.Handle.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild(“Humanoid”) then
hit.Parent.Humanoid:TakeDamage(The amount of damage you want, as an example 20)
end
end)
end)
Also, I’d use an animation for that, and a debounce, to prevent it from taking multiple damage, even if the “Touched” event isn’t fired.