How do I tweenservice my hand to tool position with CFrames?

I want to tween players arm to the tool the player is currently looking at, but I can’t get it to work

uis.InputBegan:Connect(function(input, busy)
	if busy then return end
	if input.KeyCode == Enum.KeyCode.E then 
		local hand = char:FindFirstChild("Right Arm")
		local tool = MouseRaycast().Instance
		local handtween = tweenservice:Create(hand, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0, {CFrame.new(tool.CFrame)}))
		if tool and tool.Parent:IsA("Tool") then
			handtween:Play()
			event:FireServer(tool.Instance.Parent)
		end
	end
end)

I want something like this:

the error is following:

  01:08:27.053  Workspace.mlgfoxydan.pickUpTool:55: invalid argument #1 to 'new' (Vector3 expected, got CFrame)  -  Client - pickUpTool:55
  01:08:27.053  Stack Begin  -  Studio
  01:08:27.053  Script 'Workspace.mlgfoxydan.pickUpTool', Line 55  -  Studio - pickUpTool:55
  01:08:27.054  Stack End  -  Studio

try using .Position instead of CFrame i think

1 Like

change it to

        local handTween = tweenservice:Create(hand, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {CFrame = tool.CFrame})