How can i make my custom animated hands move to the mouse position

  1. What do you want to achieve? Keep it simple and clear!
    as i mentioned in the title, i’d like to make my hands move toward the mouse, overriding an animation
  2. What is the issue? Include screenshots / videos if possible!
    i don’t know how to do it
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    i did, and the best i could do was find a script that made my hands to follow the mouse didn’t override my animation

And btw, this is my code: "local UpperRightArm = script.Parent.UpperRightArm
local UpperLeftArm = script.Parent.UpperLeftArm

while true do
UpperRightArm.CFrame = CFrame.lookAt(game.Workspace.CurrentCamera.CFrame.p)
UpperLeftArm.CFrame = CFrame.lookAt(game.Workspace.CurrentCamera.CFrame.p)
end"

This being the code i made this morning

while true do
    UpperRightArm.CFrame = CFrame.lookAt(game.Workspace.CurrentCamera.CFrame.p)
    UpperLeftArm.CFrame = CFrame.lookAt(game.Workspace.CurrentCamera.CFrame.p)
end

This code will definitely crash your game, so don’t use this. You would need a while task.wait() do loop, .RenderStepped, or Mouse.Move to prevent the crash. Also, you’re using CFrames wrong:

CFrame.lookAt(pos, lookAtPos)

There are two arguments instead of one. I don’t think you can set limb cframes because they are welded with Motor6D’s to be animatable. Try setting those instead.

by pos you mean the arms position? because i’ve tried it, and it’s not really working, i mean im flying towards the opposite position
robloxapp-20230112-1605547.wmv (794.4 KB)
robloxapp-20230112-1605378.wmv (833.5 KB)

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()

local UpperRightArm = character:WaitForChild("RightUpperArm")
local UpperLeftArm = character:WaitForChild("LeftUpperArm")


local mouse = player:GetMouse()

mouse.Move:Connect(function()
	UpperRightArm.CFrame = CFrame.lookAt(UpperRightArm.Position, game.Workspace.CurrentCamera.CFrame.p)
	UpperLeftArm.CFrame = CFrame.lookAt(UpperLeftArm.Position, game.Workspace.CurrentCamera.CFrame.p) -- i've tried mouse.Hit.p in the second clip,  but the outcome was similar
end)

What do your custom hands look like? (I don’t want to have to download a .wmv file.)

Animated hands

it’s an idle animation, and im not sure how i override it so that my hands move down while it’s playing