Why not make it a tool and use a handle?
because i don’t want it to hold it like a roblox tool
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
Have you considered welding it to the hand and changing the weld’s properties w/ CFrame?
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.
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.
Hey colbert, just wondering, if I wanted to attach the accessory to the left hand, would I clone the LeftGripAttachment into it?
I’ve heard about a Plugin which can help you easily. It’s called Tool Grip Editor Plugin.
I’ll leave link for you.
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
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.
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.
I want to attach an accessory to a hand of a R6 character, but the problem is R6 models doesnt have attachments on hands.
Is there a way to still add an accessory on hand without attachment?
Thank you!
I think the best solution would be to add hand attachments to the R6 rig and then set that rig as the StarterCharacter.
Thank you it works. I didn’t knew it is possible to add attachments manually like that.
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.
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.
For some reason, it doesnt attach itself to the players hand. It just appears on the floor
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.
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.
Also check if it is anchored or not.