So I have a custom animation script (local) inside the tool that changes the walk and idle animations when equipped and back to normal when unequipped.
local char = script.Parent
local tool = char:FindFirstChild("Real Knife")
local function equip()
local a:Weld = char:FindFirstChild("Right Arm"):WaitForChild("RightGrip")
m6d = Instance.new("Motor6D")
m6d.Parent = char:FindFirstChild("Right Arm")
m6d.Name = "RightGrip"
m6d.Part0 = a.Part0
m6d.Part1 = a.Part1
--m6d.C0 = a.C0
--m6d.C1 = a.C1
a:Destroy()
local hum = char:FindFirstChild("Humanoid")
oganim = char.Animate.toolnone.ToolNoneAnim.AnimationId
oganim2 = char.Animate.idle.Animation1.AnimationId
oganim3 = char.Animate.idle.Animation2.AnimationId
char.Animate.toolnone.ToolNoneAnim.AnimationId = "rbxassetid://0"
char.Animate.idle.Animation1.AnimationId = "rbxassetid://0"
char.Animate.idle.Animation2.AnimationId = "rbxassetid://0"
task.wait(0.1)
anim = hum.Animator:LoadAnimation(tool.Idle)
anim:Play()
anim2 = hum.Animator:LoadAnimation(tool.walk)
connector1 = hum.Changed:Connect(function(old, new)
if hum.MoveDirection.Magnitude == 0 then
if anim.IsPlaying == false then
anim:Play(.25)
end
if anim2.IsPlaying == true then
anim2:Stop(.25)
end
else
if anim2.IsPlaying == false then
anim2:Play(.25)
end
if anim.IsPlaying == true then
anim:Stop(.25)
end
end
end)
end
local function check()
if tool.Parent ~= char then
char.Animate.toolnone.ToolNoneAnim.AnimationId = oganim
char.Animate.idle.Animation1.AnimationId = oganim2
char.Animate.idle.Animation2.AnimationId = oganim3
connector1:Disconnect()
if anim.IsPlaying == true then
anim:Stop()
end
if anim2.IsPlaying == true then
anim2:Stop()
end
m6d:Destroy()
end
end
tool:GetPropertyChangedSignal("Parent"):Connect(check)
tool.Equipped:Connect(equip)
The problem is when it gets equipped the idle doesn’t look “right” sometimes.
Video:
How i want it to look:
How it looks 50% of the time