How to make a tool move to the face when clicked?

Hey! Im trying to find out how to make a tool move like the one in the video.

Ive tried messing around with the cframe and positions but no dice. I can reposition it, but Im not too good with vector 3 myself, so I cant really get it to go in front of the face.

EDIT:
In case if you guys are looking for the code I have already, its this:

local character = game.Players.LocalPlayer.Character
local head = character.Head
script.Parent.Equipped:Connect(function(Mouse)
	Mouse.Button1Down:Connect(function()
		--script.Parent.Handle.Position = head.Position
		local prev
		local parts = script.Parent:GetChildren()

		for i = 1,#parts do
			if ((parts[i].className == "Part") or (parts[i].className == "Handle") or (parts[i].className == "WedgePart") or (parts[i].className == "UnionOperation")) then
				if (prev ~= nil) then
					parts[i].Position = Vector3.new(head.Position.X,head.Position.Y,head.Position.Z)
				end
				prev = parts[i]
			end
		end
	end)
end)
1 Like

oh i remember that. yea dude its just a animation lol. If you are really determined on using cframes ig you can use to world space then multliply it by like a quarter radian

you can simply edit the tool grip:

local tool = script.Parent
local enabled = true


local function onActivated()
	if enabled then
		enabled = false
		tool.GripForward = Vector3.new(0, -0.759, -0.651)
		tool.GripPos = Vector3.new(1.5, -0.5, 0.3)
		tool.GripRight = Vector3.new(1,0,0)
		tool.GripUp = Vector3.new(0, 0.651, -0.759)

		wait(3)
		
		tool.GripForward = Vector3.new(-0.976, 0, -0.217)
		tool.GripPos = Vector3.new(0.03, 0, 0)
		tool.GripRight = Vector3.new(0.217, 0, -0.976)
		tool.GripUp = Vector3.new(0, 1, 0)
		enabled = true
	end
end


tool.Activated:Connect(onActivated)

You will have to play around with the values tho, you can use the Tool Grip Editor plugin to get the positions (or just keep tweaking them until you get it right)

Also, you seem to be changing the position of every part in the tool which is obviously a bad idea, those parts need to be welded and then you can just change the CFrame of the Handle which will make other parts change their position as well, but normally changing the CFrame of a Handle when tool is equipped will make your character change the position as well, that’s because the tools are welded to your character’s right hand by default, you need to disable that before changing the position of the tool. for R15: Character.RightHand.RightGrip.Enabled = false
now you can change the position of the handle and then re-enable the weld. but yeah, just changing the tool grips is easier

1 Like

Would you be able to send me a link to the tool grip editor plugin? Because I don’t want to risk choosing the wrong one and getting a virus in my game lol.

sure, here it is: Tool Grip Editor - Roblox

1 Like