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.
(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:
Here is the image in Server-Side:
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:
My Character:
Please let me know if you found the solution! Any suggestions or comments help a ton!