Need help with scripting animations

i am doing a commission for someone and wanted to know why the animations arent working correctly the screenshot is how its supposed to look

image

here is my idle animation script

Animations.Equipped = function(weapon: Tool)
	local Animations = weapon:WaitForChild("Animations")
	local Sounds = weapon:WaitForChild("Sounds")
	local player_Character = weapon.Parent
	local Humanoid = player_Character:FindFirstChild("Humanoid")
	local Animator = Humanoid:FindFirstChild("Animator")
	
	idle_anim = Animator:LoadAnimation(Animations.Idle)
	idle_anim:Play()
	
end

image

1 Like

Well this is probably because you rigged it wrong. It seems like the handle gets rigged to the players arm when equipped, you can do this by using a server script and seeing if the player equips the tool then use a motor6d to rig the handle to the players arm which will make the animations work probably but make sure that you have applied the C0 properly!

1 Like

i dont use any motor6d’s though

1 Like

So use it. It may fix the issue.

well how do you animate the sword wihout one

im not even an animator i dont know how to use Motor6D is there no better way?

image
this is what is inside the handle if that helps

It doesn’t require animation.

On Equip:

  • Add a Motor6D.
  • Set part0 to the players arm.
  • Set part1 to the handle.
  • Set C0 to make it so that the handle is positioned accordingly.

Done.

On Unequip:

  • Destroy Motor6D

Done

huh but its an animation its not static

Uh… What do you mean?

you said it doesn’t require an animation what did you mean?

sigh

THIS doesn’t require you to animate stuff.

oh you’re saying motor6d doesn’t require animating but i still dont know how to set that up you just said to use it and position it correctly how am i supposed to position it correctly?

This is getting a bit annoying now but it’s fine. I guess you’re new.

First, just do the above steps WITHOUT positioning anything. If it looks buggy, then do this:

To position it, (make sure you’re not in testing mode) you first need to put the tool in a rig and make sure “RequiresHandle” for your tool is set to false, after that, insert a Motor6D, set it’s Part0 to the rigs RightArm, and Part1 to the handle. Then MANUALLY position and rotate it. Then copy the transforms and apply it in the script.

local Tool = script.Parent
local Handle = Tool.Handle

local Offset = CFrame.Identity

Tool.Equipped:Connect(function()
	Motor6D = Instance.new("Motor6D")
	Motor6D.Part0 = Tool.Parent["Right Arm"]
	Motor6D.Part1 = Handle
	Motor6D.Parent = Handle
	Motor6D.C0 = Offset
end)

Tool.Unequipped:Connect(function()
	Motor6D:Destroy()
end)

yeah that did nothing its the exact same Motor6D does nothing for me

Even with the offset? Can you show an image?

an image of?
image
image
image

Yeah, just keep tinkering with the offset value, as said, test the thing in edit mode to properly adjust it.

i constantly change it though and it never changes its literally the exact same as before

Wait you aren’t changing the rotation of the blade at all. Change the rotation.