What's the most efficient way to attach model to player's hand/anything else

so i tried this script:

local death = false
script.Parent.Touched:Connect(function(hit)
if death == false then

local plr = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
if plr then
local org = game.ReplicatedStorage["Real Knife"]
local rk = org:Clone()
local handle = rk.Part

rk.Parent = workspace
local att = Instance.new("Motor6D")
att.Parent = plr.Character.RightHand
att.Part0 = plr.Character.RightHand
att.Part1 = handle
death = true
end
end
end)

but it doesn’t handle it right
https://gyazo.com/ea8365f04a5e07c27e71f124ccc91257

so what will be the most efficient way to do it?

62 Likes

Why not make it a tool and use a handle?

7 Likes

because i don’t want it to hold it like a roblox tool

7 Likes

Then I guess in order to rotate and move it you could use CFrame and CFrame.Angles.

Here is a recent script of mine:

		if EquipType == "MainHand" or EquipType == "SecondaryHand" then
			local tool = game.ServerStorage.Tools:FindFirstChild(ItemName):Clone()
			tool.Parent = Player.Backpack
			local ToolAttachment = tool.AestheticPart.PartAttachment
			local Motor = Instance.new("Motor6D", tool)
			Motor.Part1 = tool.AestheticPart
			Motor.Part0 = Player.Character.RightHand
			Motor.C1 = ToolAttachment.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(180), 0, 0)
		end

Note: I used CFrame.fromEulerAngles because I wanted to, it’s the same as CFrame.Angles

11 Likes

Have you considered welding it to the hand and changing the weld’s properties w/ CFrame?

5 Likes

I usually just add WeldConstraints to all of the parts in the model, and connect each of them to the PrimaryPart (you can do this in a script a lot easier).

Then I just weld the PrimaryPart to the Character, and Walah, you’ve got yourself a solution.

3 Likes

I call this one the no-code accessory method. It uses the underappreciated accessories and the amazing attachment setup already found in Humanoids. All you need to do is call AddAccessory on the knife after cloning it. As for welding, do it in Studio with WeldConstraints, don’t write code for it.

There’s of course many ways to make pseudotools, as in attaching models to arms instead of using tools. I’m a big fan of it and do it a lot. I’ll just be showing you the easy and quick way without much thought behind it. Note that this works for left-handed tools as well.

This is purely a picture tutorial, as they are self explanatory. Please do ask if you have questions.

313 Likes
Making Dual Wielding Sword
How can I make a character equip a tool using a script?
Help with Welding Armor to a player
How To Put Items On A Player's Back? (Like a Sword)
Uhh, some help needed on my Hanging knife thingy script
How to achieve this?
Attach parts to players' hands without tools
Weapon Not Welding To Player?
I need help with making a melee weapon without using a tool
How do I put accesories (like helmets or webbings) on players depending on the team?
Full body R15 armor suit
Problems with animating weapons?
Weld not working
How to make a meshpart go on your back
How to make a custom inventory
Auto Equip Weapons?
A tool appear in a certain hand
How does roblox position accessories?
Can I make a tool go in the left hand instead of the right?
Raycast Hitbox 4.01: For all your melee needs!
Custom Character Rigging Issues
The best way to make a custom tool system
Wondering how I'd go about script a Scythe/Weapon Without it being a tool
Dual wielding swords?
How do I make camera?
Roblox modeling via blender
How to attach a model to a r6's players hand without using tools
New Physics Class: RigidConstraint
Rotating a turret that's welded to a bigger object/NPC with weld.C0
How do i position an attachment?
How can I fix my sword orientation issue?
How could i make a character switching system?
Motor6D object to hand not right?
Positioning a Model correctly on the character, any help?
How to put shoes in my game
Custom scripted tool system help
Help with making equipable boost giving boots
How would I go about doing this animation?
How would I weld a part to the character?
Sword Animation?
How do I make my own Custom wearable hat
Need help with my Expedition Stuff
Moving attachment .2 blocks down?
How to use weld to let player hold a item
I need help rotating grouped parts after they are moved onto the players hand

Hey colbert, just wondering, if I wanted to attach the accessory to the left hand, would I clone the LeftGripAttachment into it?

4 Likes

I’ve heard about a Plugin which can help you easily. It’s called Tool Grip Editor Plugin.
I’ll leave link for you.

Link for plugin (click here to open)

3 Likes

if i want to make it like, when player presses Key ‘1’ it will change the blade color to Black, how i do that?

bc when i try to do it, it gives me this:

Edit: nvm i found out the problem, and it works, thanks

2 Likes

@haash_im

In my mini-tutorial, I don’t clone attachments. I made a completely new attachment on the accessory’s handle and positioned it on the handle of the mesh. You can see this from how I circle the front and right axis on both the rig’s RightGripAttachment and the sword’s attachment.

AddAccessory automatically aligns attachments of the same name. You’ll notice that I rotated the attachment on the sword so when I use AddAccessory, the axis would line up.

If you wanted to make my specific tool left-handed, all you’d need to do is change the name of the attachment in the sword handle to LeftGripAttachment.


@Rezy_Dev

Tool Grip Editor is only for changing the grip of a tool instance on equip. It doesn’t add tools to hands as OP requested as they’re using a custom tool solution here.

12 Likes

I want to attach an accessory to a hand of a R6 character, but the problem is R6 models doesnt have attachments on hands. image
Is there a way to still add an accessory on hand without attachment?
Thank you!

5 Likes

I think the best solution would be to add hand attachments to the R6 rig and then set that rig as the StarterCharacter.

5 Likes

Thank you it works. I didn’t knew it is possible to add attachments manually like that.

5 Likes

Where are you getting your test dummies from? R6 characters have hand attachments added natively. You may not be working with an updated model. It’s best to reference an actual character that’s constructed in a live game rather than something generated or retrieved from another source.

See:

Don’t use StarterCharacter if you aren’t majorly changing the construct of a rig.

11 Likes

Oh thank you so much for informing me. I am using R6 dummies from toolbox. I added some other R6 dummies from toolbox and they also didnt had any attachments on arms, so that made me believe that there arent any attachments on arms.

2 Likes

For some reason, it doesnt attach itself to the players hand. It just appears on the floor

2 Likes

This would be a problem with your implementation. Please supply details about your current attempt. I can’t help you if all I have is this message to work from. Whenever something doesn’t work, you should always strive to provide as much about the circumstances as possible.

2 Likes


It appears on the ground, not the hand
The steps were followed, just something is wrong…

1 Like

Could you supply other information about this? I still don’t have enough to work off of.

  • What is the hierarchy of the model?
  • How do you attach this to the player? What’s the code you’re using?
  • Can you confirm that a matching attachment for the handle exists in the character?

I’ve provided a small repro so you can check if what you’re doing matches exactly with the tutorial or my given implementation. Following through is important, including with naming choices.

Artificial Tool Repro.rbxl (49.2 KB)

The accessory is located in ServerStorage and the code I used is in StarterCharacterScripts.

6 Likes