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.
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)
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.
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.
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