i tried
if char:findFirstChild("Tool") then
I didnt know what to do next make the health infinite? that wouldnt work its a fighting game. I dont know if this is possible but yeah. I know the handle doesnt damage the player, but im not using a handle
You will need to add another check. Example
remote.OnServerEvent:Connect(function(plr) local character = plr.Character local newPart = Instance.new("Part") newPart.Anchored = true newPart.Position = Vector3.new(0,0,0) newPart.Touched:Connect(function(hit) if hit:IsDescendantOf(character) then return end --the check print("KONO DIO DA") end) end)
The touched event sends the part that was touched as a parameter. Using :IsDescendantOf() is a check to see if the part that was touched is a part of the players character
local Debounce = false script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") and Debounce == false then Debounce = true hit.Parent.Humanoid:TakeDamage(100) wait(1) Debounce = false end end)
This script will make damage to a player.