-
What do you want to achieve? Keep it simple and clear!
So I made this idle animation for my tool and the arm doesnt seem to be accurate to the animation and i wanna fix it -
What is the issue? Include screenshots / videos if possible!
this is what my idle animation should look like (and yes the animation priority is idle)
this is what happened ingame
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
i tried moving the right arm in the animator but it doesnt seem to work
the right arm became accurate in the attack animation though
this is my script
local tool = script.Parent
local char
local m6d
local idle
tool.Equipped:Connect(function()
char = tool.Parent
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:FindFirstChildWhichIsA("Humanoid")
local animator = hum:FindFirstChildWhichIsA("Animator")
idle = animator:LoadAnimation(script.Idle)
idle.Looped = true
idle:Play()
end)
tool.Unequipped:Connect(function()
idle:Stop()
m6d:Destroy()
end)
local cd = false
tool.Activated:Connect(function()
if cd == false then
cd = true
local hum = char:FindFirstChildWhichIsA("Humanoid")
local animator = hum:FindFirstChildWhichIsA("Animator")
local stabanim = animator:LoadAnimation(script.Attack)
stabanim:Play()
task.wait(1/2)
local all = workspace:GetDescendants()
for i, v in pairs(all) do
if v:IsA("BasePart") then
local victim = v.Parent:FindFirstChildWhichIsA("Humanoid")
if victim and (victim ~= hum) then
if (v.Position - script.Parent.Handle.Position).Magnitude <= 4 then
victim:TakeDamage(100)
end
end
end
end
stabanim.Ended:Wait()
cd = false
end
end)