Tool = script.Parent
if script.Parent.Humanoid.Health == 0 then
Tool:Destroy()
end
i wanna make it so when an NPC dies it automatically drops the tool but apparently this script doesn't work how do i make it drop the tool?
Tool = script.Parent
if script.Parent.Humanoid.Health == 0 then
Tool:Destroy()
end
i wanna make it so when an NPC dies it automatically drops the tool but apparently this script doesn't work how do i make it drop the tool?
Try putting a script in a tool (which is inside the NPC I assume), and paste this:
local tool = script.Parent
tool.Parent:WaitForChild("Humanoid").Died:Connect(function()
tool:Destroy()
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
also i figured out on how to code block :)
before i answer, what script is this in?
the model