I have a hitbox, but the problem is, I want it to hit multiple people, but still not hit someone that was already hit by it more than once, how would I go about doing this?
Hit part of my code:
local OnCooldown = false
Hitbox.Touched:Connect(function(Hit)
if not Hit:IsDescendantOf(Character) and Hit and Hit.Parent then
local Humanoid = Hit.Parent:FindFirstChild("Humanoid")
if Humanoid then
if OnCooldown == false then
OnCooldown = true
Humanoid:TakeDamage(Damage)
end
end
end
end)