As seen in this video the stun animation which is being played on client is not replicating to server. I am playing the animation from the person attacking and not the person being hit.
local function Attack(typeOfAttack, hitPart, enemyHum)
if typeOfAttack == 'm1' then
local stunAnimTrack = enemyHum:FindFirstChild('Animator'):LoadAnimation(stunAnim)
stunAnimTrack:Play()
stunAnimTrack:Destroy()
hitEvent:FireServer(enemyHum, 4)
elseif typeOfAttack == 'heavy' then
local stunAnimTrack = enemyHum:FindFirstChild('Animator'):LoadAnimation(stunAnim)
stunAnimTrack:Play()
stunAnimTrack:Destroy()
hitEvent:FireServer(enemyHum, 8)
end
end