I am trying to make an animation where a model (item used is an ammo box) that is placed in the R6 character model is moved with the arms, so the character is holding the ammo box.
The problem I face is that the arms move up, but I have not been able to get the ammo box to move with the arms. I believe it might be a problem with the Motor6Ds I placed under the arms or with the animation itself.
I placed a Motor6D under each arm which has Part0 as the arm and Part1 as “LeftHandle”/“RightHandle” which is a part under the ammo box where I want the arms to hold it. I am trying to use the Motor6D for it to attach the arm and box.
-
This is the animation editor with my desired outcome:
-
This is the code I use to run the animation on the rig:
-- script.Parent is the character
local humanoid = script.Parent:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
-- Animation which moves arms up with item
local armAnim = Instance.new("Animation")
armAnim.AnimationId = "rbxassetid://10545624196"
local animTrack = animator:LoadAnimation(armAnim)
animTrack:Play()
- This is the outcome when I join the game on Studio:
So far I have tried making the Motor6D instances in the script before the animation plays but it moves the ammo box to the bottom of the other arm. I have not found any topic on the DevForum about this and I would appreciate any help with getting the intended animation.