-
What do you want to achieve? Removing double-hitting so m1s are true
so to quickly explain what i mean by that u can look at any game on the front page with close-range combat, if u were to try to hit each other at the same time, only the first person that started the hit animation first would be the one who would hit the enemy. https://gyazo.com/90adeccc577c9d7b0e0efc5ee3aa7bf8 -
What is the issue? https://gyazo.com/f112a21df3c69f86fa327a02b0b1ff99
https://gyazo.com/4c99f1300d75f05575117a979db4c46c
https://gyazo.com/71e612a72b6d54d190e90b9ed4bba7df (double hitting each other which makes m1s untrue) (note im using region3) -
What solutions have you tried so far? Deleting the hitbox of the enemy
Wouldn’t adding a debounce be the solution to your problem here?
1 Like
I have the same thoughts as straykevin, a simple debounce should fix any problems with hitting multiple times, and if you really want you can just make value in the script and the part will only “hit” anything one time, something like this
local AlreadyHit = false
part.Touched:Connect(function(hitpart)
if AlreadyHit = false then
AlreadyHit = true
--Deal damage and whatever else
else
--If it already hit something then it can't hit anything else.
end
end)
1 Like
Made a check for stun right above the hitbox spawn script
https://gyazo.com/caf1c230968a30686db4618defacfc22