Animation consistency issue between client and server side

I am writing about a certain animation consistency issue.

What I’ve done to create this issue:

So while making a tool system for my game, I decided to handle animation states by changing the “idle”, “walk”, “run”, etc… values in the local Animate script found within every roblox Character.
image
(reference image)

Here is my code that handles this:

["EquipTool"] = function(player: Player, toolName: string)

		-- Top Level Constants

		local Character = player.Character or player.CharacterAdded:Wait()
		local Humanoid = Character:WaitForChild('Humanoid')
		local Animate = Character:WaitForChild('Animate')

		-- Grabbing and Placing Tool

		local ClonedTool = game.ReplicatedStorage.Shared.Tools:FindFirstChild(toolName):Clone()
		ClonedTool.Parent = Character

		-- Setting up Motor6D for Animations

		local Motor6D = Instance.new('Motor6D', Character:WaitForChild('HumanoidRootPart'))
		Motor6D.Part0 = Character:WaitForChild('HumanoidRootPart')
		Motor6D.Part1 = ClonedTool:WaitForChild('Handle')
		Motor6D.C0 = ClonedTool:GetAttribute("CFrame")

		-- Replacing Animation

		for _, anims in pairs(ClonedTool:WaitForChild('Animations'):GetChildren()) do
			if anims:GetAttribute("Type") == "Idle" then
				Animate.idle.Animation1.AnimationId = anims.AnimationId
				Animate.idle.Animation2.AnimationId = anims.AnimationId
			else if anims:GetAttribute("Type") == "Walk" then
					Animate.walk.WalkAnim.AnimationId = anims.AnimationId
				end
			end
		end

	end,

Disclaimer: I’m using my own style of handling remote events, THIS IS A REMOTE EVENT FUNCTION

What’s the problem in more detail?

Here is an image of the Idle animation in Client-Side:
image

Here is the image in Server-Side:
image

Any other extra information that’d be helpful?

Here is my script that’s inside my tool to play animations client side:

local TS = game:GetService("TweenService")
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild('Humanoid')
local Mouse = Player:GetMouse()
local Synth = require(game.ReplicatedStorage.Synth).new({}, game.ReplicatedStorage.Plugins)
local Aria = Synth.Animations.new()
Aria:SetAnimationFolder(script.Parent.Parent:WaitForChild('Animations'))
Aria:Preload()


Humanoid:ChangeState(Enum.HumanoidStateType.Landed)

local idleAnim = Aria:GetAnim("Idle")  -- Get a reference to the "Idle" animation

Aria:Load(Character:WaitForChild('Humanoid'))
Aria:Play("Equip")

Aria:GetAnim("Equip").Stopped:Connect(function()
	Aria:GetAnim("Idle"):Play()
end)

Mouse.Button1Down:Connect(function()
	Aria:Play("Swing1")
end)




-- Check if the player is moving and stop the idle animation accordingly
Humanoid:GetPropertyChangedSignal("MoveDirection"):Connect(function()
	Aria:GetAnim("Idle"):Stop()
end)

Disclaimer: Aria is simply a library I made to Preload all animations through ContentProvider and Load all of them to the Humanoid’s Animator

What about your explorer tree?

Excalibur Tool:
image
My Character:
image

Please let me know if you found the solution! Any suggestions or comments help a ton!

Have you tried to disable the Retargeting property in workspace?

Have you tried to replicate the issue with different animations? I know this answer is the equivalent of “turn it off and on again” but it may be an animation issue.

image

image

Nope it still has this bug.

I’ve tried changing it to a random walk cycle, and it’s the same consistency issue. The server either doesn’t allow the keyframes to fully play or it breaks completely like the last idle animation.

Hey have you loaded the animations on the humanoid or the animator? Might get better results if it’s on the animator

It’s all loaded on the animator

Nevermind guys, I found the solution. Turns out changing the idle animation value from a server script is pretty redundant. I just made a local script within the tool itself and check if the player’s moving. And if they were then the idle animation would stop while if the player wasn’t moving the idle animation would play.

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