Converting Tool GripPos to CFrame

Hello, I am trying to convert a Tool grippos from Vector3 to a CFrame. I have no clue how to do this and I need to do this for adjusting the C1 of a weld I created to match the CFrame of the tool. Any help is appreciated, thanks!

1 Like

Can you show us what you have so far?

I’m pretty sure that GripPos is a CFrame relative to the position of your arm (or RightHand cframe joint thing when it comes to R15). C0 and C1 have always confused me, but I heard that C1 is simply an addition to C0, or it’s basically relative to C1.

Tell me if you are using R6 or R15, and I’ll see what I can do.

Im using R15, this is the code I have tried so far. The model is a sword welded to the players hand, the tool has the blade.

Here is the current script:

events.Test.OnServerEvent:Connect(function()
	print("fire")
	local tool = player.Character:FindFirstChildWhichIsA"Tool"
	local model = player.Character.Lightsaber
	local handle = tool.Handle
	model.Weld.Part0 = handle
	handle.Parent = model
	for i = 0,20,.01 do
		wait()
		handle.CFrame = handle.CFrame * CFrame.new(0,0,i)
		model.Weld.C1 = handle.CFrame
	end
	for i = 20,0,-1 do
		wait()
		handle.CFrame = handle.CFrame * CFrame.new(0,0,i)
		model.Weld.C1 = handle.CFrame
	end
end)

Can you just use Tool | Roblox Creator Documentation? It’s a CFrame.

3 Likes