Hello! I am currently making an ability and i want to ask if it is possible to make a hitbox ignore the player who activated it. I tried everything i can think of(i am super bad at scripting lol). Thank you!
hitbox code:
HB.Touched:Connect(function(hit)
if game.Players:FindFirstChild(hit.Parent.Name) or hit.Parent.Name == "TestDummy" then
if hit.Parent:FindFirstChild("Humanoid") then
print("yes")
if impactFramePlayed == false then
impactFramePlayed = true
HB:Destroy()
game.ReplicatedStorage.Events.BehmothBash:FireClient(plr)
game.ReplicatedStorage.Events.BehmothBash:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent))
wait(0.3)
hit.Parent:WaitForChild("Humanoid").Health =- 35
game.ReplicatedStorage.Events.ImpactFrameB:FireClient(plr)
game.ReplicatedStorage.Events.ImpactFrameEvent:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent))
wait(5)
print("e")
else
return
end
end
end
end)
HB.Touched:Connect(function(hit)
if hit.Parent.Name == game.Players.LocalPlayer.Name then
return
end
if game.Players:FindFirstChild(hit.Parent.Name) or hit.Parent.Name == "TestDummy" then
if hit.Parent:FindFirstChild("Humanoid") then
print("yes")
if impactFramePlayed == false then
impactFramePlayed = true
HB:Destroy()
game.ReplicatedStorage.Events.BehmothBash:FireClient(plr)
game.ReplicatedStorage.Events.BehmothBash:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent))
wait(0.3)
hit.Parent:WaitForChild("Humanoid").Health =- 35
game.ReplicatedStorage.Events.ImpactFrameB:FireClient(plr)
game.ReplicatedStorage.Events.ImpactFrameEvent:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent))
wait(5)
print("e")
else
return
end
end
end
end)```
if hit.Parent.Name == game.Players.LocalPlayer.Name then
return
end
else
if game.Players:FindFirstChild(hit.Parent.Name) or hit.Parent.Name == "TestDummy" then
if hit.Parent:FindFirstChild("Humanoid") then