I have a tool, that removes 18 hp from the player that gets clicked on. If the thing that gets clicked on doesn't have a humanoid, it will print("No humanoid found")
But now, it prints "No humanoid found" although I click on a player.
Tool script: (Client side, local script)
tool = script.Parent
player = game.Players.LocalPlayer
tool.Equipped:Connect(function(mouse)
mouse.Icon = "http://www.roblox.com/asset/?id=2312592107"
mouse.Button1Down:Connect(function()
game.Workspace.KillExplosion.KillExplosionCreate:FireServer(mouse.Target, tool.Handle)
end)
end)
Server script: (Server side, normal script)
debounce = false
script.KillExplosionCreate.OnServerEvent:Connect(function(player, target, tool)
if debounce == false and target.Parent:FindFirstChild("Humanoid") == true then
print("found humanoid")
debounce = true
wait(1)
debounce = false
else
print("no humanoid found")
end
end)
Thank you for help!

14 comments
I still get the same error.
you sure? i tested it in studio myself
Make sure the model you are clicking on has a humanoid in it as the descendant of target.Parent
Let me check again.
and also, make sure it is named exactly Humanoid, the model i used to test this one was the drooling zombie,its a free model you can take
Actually, when I test on a server, I did not print ANYTHING.
Ok I will test.
I will come back to you tomorrow ok?
all the printed outputs are on the server, not the individual players screens as you put the print in a server side script
Oh! True, I will check.
You are a fu**ing genius.
Thanks man! It worked.
Now I will upvote all comments, give you some points ;)
no prob bro, thanks