Trying to animate an NPC while Player's character is moving (jojo stand)

  1. What do you want to achieve?
    Trying to make a move / idle animation based off of if your character is moving or idling

  2. What is the issue?
    The issue is, how I’m doing it is on a client script where I’m detecting movement for your player’s movement, I’m playing the stands animations. But it’s not replicating to the server

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Hidden devs, and devforum

--// Client Script in replicated first
table.insert(Events,Hum.Running:Connect(function(speed)
		
		if Hum.WalkSpeed>=20 and speed >1  then
			WalkTrack:Stop()
			IdleTrack:Stop()
			
			if MoveStandTrack then
				MoveStandTrack:Play()
			end
			if not RunTrack.IsPlaying  then
				RunTrack:Play()
			end

		elseif Hum.WalkSpeed < 20 and speed > 1 then
			RunTrack:Stop()
			IdleTrack:Stop()
			
			if MoveStandTrack then
				MoveStandTrack:Play()
			end
			if not WalkTrack.IsPlaying  then
				WalkTrack:Play()
			end
		else 
			RunTrack:Stop()
			WalkTrack:Stop()
			IdleTrack:Play()
			if IdleStandTrack then
				IdleStandTrack:Play()
			end
		end	
	end))

--//Summoning handler:
return function(Character, Summoned)
	local Player = Players:GetPlayerFromCharacter(Character)

	local RootPart = Character:FindFirstChild("HumanoidRootPart")

	local StandValue = Player.Stats.Style.Value

	if Summoned then
		local Stand : Model = StandFolder:FindFirstChild(StandValue):Clone()
		local StandRoot : BasePart = Stand:FindFirstChild("HumanoidRootPart")

		Stand.Name = StandValue.."_"..Player.Name
		StandRoot.CFrame = RootPart.CFrame * StandLibrary.StandInfo[StandValue].DisabledPos
		Stand.Parent = Character

		Weld(RootPart, StandRoot, StandLibrary.StandInfo["Star Platinum"].DisabledPos)
		local WeldTween = RootPart:FindFirstChild(Player.Name.."_Weld")
		
		for Index, BodyParts in ipairs(Stand:GetDescendants()) do
			if BodyParts:IsA("BasePart") and BodyParts ~= StandRoot then
				TweenModule.obj(BodyParts, "Quint", "Out", .3, {Transparency = 0})
			end
		end
			
		ClientEffects:FireAllClients("Sound", {Origin = RootPart, Sound = ReplicatedStorage.Sound["Star Platinum"].Summon})
		ClientEffects:FireAllClients("Sound", {Origin = RootPart, Sound = ReplicatedStorage.Sound.StandSummon})
			
		TweenModule.obj(WeldTween, "Quint", "Out", .2, {C0 = StandLibrary.StandInfo["Star Platinum"].EnabledPos})
	else
		local Stand : Model = Character:FindFirstChild(StandValue.."_"..Player.Name)
		local StandRoot : BasePart = Stand:FindFirstChild("HumanoidRootPart")

		local WeldTween = RootPart:FindFirstChild(Player.Name.."_Weld")
		TweenModule.obj(WeldTween, "Quint", "Out", .2, {C0 = StandLibrary.StandInfo["Star Platinum"].DisabledPos})
		
		ClientEffects:FireAllClients("Sound", {Origin = RootPart, Sound = ReplicatedStorage.Sound.StandUnsummon})

		for Index, BodyParts in ipairs(Stand:GetDescendants()) do
			if BodyParts:IsA("BasePart") and BodyParts ~= StandRoot then
				TweenModule.obj(BodyParts, "Quint", "Out", .3, {Transparency = 1})
			end
		end
		
		game.Debris:AddItem(Stand, .5)
		game.Debris:AddItem(WeldTween, .5)
	end
end