Alligning object in player's hand


The image above shows a stick near the player’s hand. The issue is that the stick won’t move to the proper position on the player’s hand, here is my script:

local Animator = Humanoid:WaitForChild("Animator") -- player's animator
local RightArm = Char:WaitForChild("Right Arm") -- player's right arm
local Stick = Char:WaitForChild("Stick") -- stick (should be on the player's right arm)
local Marshmallow = Char:WaitForChild("Marshmallow") -- marshmallow (should be on the stick)
Stick.Position = RightArm.Position
Marshmallow.Position = RightArm.Position

local Joint = Instance.new("Motor6D")
Joint.Name = "Stick"
Joint.Part0 = RightArm
Joint.Part1 = Stick
Joint.Parent = RightArm

local RoastTrack = Animator:LoadAnimation(script.RoastAnimation) -- roasting marshmallow track
RoastTrack:Play() -- plays animation track

game:GetService("RunService").RenderStepped:Connect(function()
	Char:MoveTo(Vector3.new(14.25, 5, 7.175)) -- move character onto log
end)

It seems like no matter where I set the position of the stick or marshmallow, it doesn’t change in game. I’ve set the position of the stick to the HumanoidRootPart, and it stays in the same position as if I set the stick’s position to the Right Arm.

For those of you who don’t know what a motor6d is, all it does is connect the right arm to the stick in a way which makes the stick animatable

Dont use motor6ds, use Welds and set C1 with vector3.new

Use weld constraints i recommended you research how to use them aswell (if your unsure)

If I were to use a weld, it would just be glued to the player’s hand, right? I could use a weld, but I would prefer to be able to move the stick separately. I looked at C1, and it looks like an offset property for welds (which is exactly what I need, but I am not using a weld at the moment)

Also would this be a fix to my issue? Or is it just general advice to use a weld instead of Motor6D?

Just so you know weld constraints allow you to move it separately and still be connect to the arm and are simple to use

Ok, I’m going to give this another try with WeldConstraints. I’ll let you know if it works, thank you for the advice

I added a WeldConstraint to the Right Arm, and it doesn’t allow me to move the stick seperately. I planned on doing unique animations for each NPC, but I could just use a weld for now.

Thats a moon animator problem not a script problem right.

You could edit the sticks cframe in script and it would still be relative to the arm but with a offset

Well, it happens in the roblox animator too, so it’s not an issue with moon animator. What I was trying to figure out how to script is an offset. Something like Stick.Position = RightArm.Position + Vector3.new(1, 0, 0), and that wasn’t working.

That isnt how you set it up… ill send a script shortly

stick.CFrame = rightarm.CFrame + offset --you will need to find the offset you need

--also if you want to edit cframe then just recycle that line

local weld = Instance.new("WeldConstraint")
weld.Parent = stick
weld.Part0 = stick
weld.Part1 = rightarm

If you are trying to animate the stick search up moon animator tutorial as it takes a lot of explaining to do