How to make a tool attach without the tool instance

  1. I am trying to make a tool attach to a arm without using the tool instance or just with a part.

  2. I have asked people checked the dev fourm and still can’t find what I am looking for.

I want something like this but without using a tool:

Can you please help me, adminaccount58. Thank you :slight_smile:

1 Like

You would need to male a script which always sets the main parts’ position to that of the chatacters hand:


local Player = path.to.player
local MainPart = path.to.main.part

while true do
if Player.Character then
local Arm = Player.Character:WaitForChild("rightlowerarm")
MainPart.Position = Arm.Position
end
end

Note: This is just an example you would also meed to check if the part is equipped

…Which you can do using the simple Equipped property.

Example:

script.Parent.Equipped:Connect(function()
-- you can replace this code
print("someone just wielded the tool!")
end)

I think welding is your best bet here.

local Arm = script.Parent:WaitForChild("Right Arm") 
local FryingPan = workspace:WaitForChild("FryingPan")

local Weld = Instance.new("Weld") 
Weld.Parent = Arm
Weld.Part0 = Arm --We set Part0 to the Arm
Weld.Part1 = FryingPan --We set Part1 to the FryingPan

Weld.C1 = CFrame.new(0,.5,1.5) --C1 is basically a CFrame for the offset point of the FryingPan. 

Of course, this is just an example and not an actual snippet of code. The CFrame won’t be entirely accurate, so you’ll have to do a lot of tinkering.

You can read more about Welding here.