How should I go about detecting if an animation is playing on local script?

Basically, in my game I use a lot of NPC’s and they will each have animations, I recently found that using GetMarkerReachedSignal is a really good way to have specific moments in an animation to play a sound or visual effect, the problem is however all my NPC’s handling is done on the server and GetMarkerReachedSignal can only be used on the client, so I’m not too sure how I should communicate between the server-sided script and client-sided script, obviously I will use RemoteEvents but how can I go about detecting if the animation is playing in the first place? And would I have to create a RemoteEvent for each specific ability animation in my game?

This is what I have in my local script, none of this functions properly though because I’m not sure how to detect when a specific animation is playing in my game, that’s my main issue.

-- // SERVICES // --
local RunService = game:GetService("RunService")

-- // VARIABLES // --
local NPC repeat NPC = game.Workspace:FindFirstChild("Subzero") task.wait() until NPC
local WalkAnimation = NPC.Humanoid:LoadAnimation(NPC.Animations.Walk)
local IdleAnimation = NPC.Humanoid:LoadAnimation(NPC.Animations.Idle)
local Ability1Animation = NPC.Humanoid:LoadAnimation(NPC.Animations.Melee)
local Ability2Animation = NPC.Humanoid:LoadAnimation(NPC.Animations.IcicleRaise)
local Humanoid = NPC:FindFirstChild("Humanoid")

RunService.RenderStepped:Connect(function()
	-- testing purposes, nothing was printed though
	if Ability2Animation.IsPlaying then
		print("found")
	end
	
	if WalkAnimation.IsPlaying then
		print("foundWalk")
	end
end)

after a little bit i have sorta a solution but i still need some help with it.
i have this line of code in my npc’s server script

game.ReplicatedStorage.Events.AnimationEvent:FireAllClients(Ability2Animation)

and then i have this line in my client script but it prints it as nil and i’m not sure why

game.ReplicatedStorage.Events.AnimationEvent.OnClientEvent:Connect(function(Animation)
	print(Animation)
end)

Are the animations playing on a different script? Like if there’s a “Animate” script in the model that plays the animations.

No there is a local script inside of StarterCharacterScripts (not sure if I should’ve put it there or not) that will handle all the animations in the game. The animations are played in the npc’s server script.

So i will try my best to understand this and make up a solution, you could probably use attributes to check if a animation is playing or not, and the server script to set the attribute from true or false.

Alright I will look into doing that thank you.