When I use Humanoid:TakeDamage() the damage on only players becomes inconsistent after the 1st or 2nd use of :TakeDamage().
NPC Damage
Player Damage
FireServer
--In localscript inside StarterPack
DamageEvent:FireServer(EnemyHumanoid,20) --EnemyHumanoid, Damage(20)
OnServerEvent
--In serverscript inside ServerScriptService
DamageEvent.OnServerEvent:Connect(function(Player,EnemyHumanoid,Damage)
local HitDebounce = false
if not HitDebounce then
--Hitcount += 1
--print("Damage: "..Damage)
EnemyHumanoid:TakeDamage(Damage)
--print("Hitcount: "..Hitcount,"Enemy Health: "..EnemyHumanoid.Health)
HitDebounce = true
end
end)
I have looked around the DevForum and the RobloxAPI Docs, so unless I have missed something, What am I doing wrong?