I want to move a tool to a specific position in the world, like so:
local localPlayer = game.Players.LocalPlayer
local customPosition = localPlayer.Character.Head.Position + Vector3.new(0, 5, 0)
tool.Grip = CFrame.new(customPosition)
However, this approach doesn’t work because Grip
uses relative (object) coordinates between the handle’s CFrame
and the CFrame
position of your right hand, both of which are in world coordinates. I thought using an offset might help, so my next step was:
local localPlayer = game.Players.LocalPlayer
local customPosition = localPlayer.Character.Head.Position + Vector3.new(0, 5, 0)
local armPosition = localPlayer.Character["Right Arm"].Position
local offset = customPosition - armPosition
tool.Grip = CFrame.new(offset)
But this also didn’t work because moving a tool using Grip
involves considering angles as well. I understand that attempting to move an item in this manner might seem unconventional, but it’s necessary for maintaining its Activate()
function. Simply moving the handle within the tool (tool.Handle.CFrame = CFrame.new(customPosition)
) would also move the character. Creating a clone of the handle isn’t an option because it would disrupt the tool’s mechanics.
Is there another way to move an item such that the local player remains in place and can still interact with this tool effectively?