Why is my animation idle animation merging with my attack animation? The goal is for the idle animation not to blend with the action animation. I’m assuming I need to implement AdjustWeight
into this–anyone know how?
- They’re both Action (Needed because I want a different idle animation to play when the tool is unequipped)
local plr = game:GetService("Players").LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
-- Services
local UIS = game:GetService("UserInputService")
local Replicated = game:GetService("ReplicatedStorage")
-- Events
local LightAttack = Replicated.Events.PlayerRemotes:WaitForChild("LightAttack")
-- Tool
local tool = script.Parent
local idle = tool.FistIdle
local idleAnimationTrack = hum.Animator:LoadAnimation(idle)
local connect
tool.Equipped:Connect(function()
idleAnimationTrack:Play()
connect = UIS.InputBegan:Connect(function(input, isTyping)
if isTyping then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
LightAttack:FireServer()
elseif input.UserInputType == Enum.UserInputType.MouseButton2 then
return
end
end)
end)
tool.Unequipped:Connect(function()
idleAnimationTrack:Stop()
connect:Disconnect()
end)