Animations played on client not replicating to server

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

Animations are replicated for players only when they play animations for themselves

You have to play the animation on the server side or on the client side of the player getting hit

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.