I’m using the torso, attaching it to the Motor6D for my railgun animation which would have the end result of this:
However, I end up with the result of this despite already attaching the Motor6D from the player’s torso to the bodyattch. How do I fix it so that it’ll play the animation correctly?
Code for the tool:
local Railgun = script.Parent
local ShootPart = Railgun.ShootPart
Railgun.Equipped:Connect(function()
local Idle = Railgun.Parent.Humanoid:LoadAnimation(script.Idle)
local Fire = Railgun.Parent.Humanoid:LoadAnimation(script.Fire)
Idle.Priority = Enum.AnimationPriority.Action
Fire.Priority = Enum.AnimationPriority.Action4
local ToolGrip = Railgun.Parent.Torso.BodyAttch
ToolGrip.Part1 = Railgun.BodyAttch
Idle:Play()
Railgun.Activated:Connect(function()
Fire:Play()
end)
end)
BodyAttch hierachy: