How to replicate pet animations across all clients

In the past, I am positive if pets had their network owner set to the player, then all animations played on your client for that pet would replicate across all clients. That doesn’t seem to be a thing anymore. So how can I replicate them across all players??

I’ve tried playing on server, but 2 issues:

  1. They cause lag after a while
  2. It’s impossible to set a walk animation when required

I have a walk animation that needs to play if the pet is moving, however I can’t check that on the server, as the their position and the AlignPosition property do not match what the client says

So I’m wondering if there’s a better way to go about it

task.spawn(function()
		local CurrentPet = PlayerService.Cache[player].CurrentPets[petId]
		CurrentPet.Animations.Idle:Play() -- Start idle
	
		while true do
			if not PlayerService.Cache[player] then break end
			
			if not PlayerService.Cache[player].CurrentPets[petId] then break end
			
			if PlayerService.Cache[player].CurrentBoat then -- On boat
				if CurrentPet.Animations.Walk.IsPlaying then
					CurrentPet.Animations.Walk:Stop()
				end
				
				if not CurrentPet.Animations.Idle.IsPlaying then
					CurrentPet.Animations.Idle:Play()
				end
			else -- On land
				if not SpawnedPetModel then return end
				
				if not SpawnedPetModel.PrimaryPart then return end
				
				if (SpawnedPetModel.PrimaryPart.AlignPosition.Position - SpawnedPetModel.PrimaryPart.Floor.WorldPosition).Magnitude >= 1 then
					--print(SpawnedPetModel.PrimaryPart.AlignPosition.Position, SpawnedPetModel.PrimaryPart.Floor.WorldPosition)
				else
					--print("IDLE")
				end
			end
			
			task.wait()
		end
	end)

Here’s what I run on the server. The print IDLE never prints, and thus the server thinks the pet is walking the whole time when it isn’t