How To Put Items On A Player's Back? (Like a Sword)

Alright so basically what I’m looking for is how to make it so that when you pick up a parachute pack, and when you equip it, you get the parachute and not the backpack. Also I’d like to know how I would make it so that when the player picks up the item, it stays on their back until they equip/use it.



So the two images are when the items are equipped, but not being used yet. When they’re not equipped it doesn’t do an animation.

Sorry for the bad explanation, I originally came here to figure out how to pick up a parachute pack, but get the actual parachute instead, kinda like if you pick up a backpack, but instead the tool is a notebook, but with parachutes. But I also wanted to know how to make an item stay on the player’s back when it’s not equipped, and do an animation when it is equipped. Usually the tools in your inventory are invisible until you use them, but I want to make them visible and stay on the player’s back.

3 Likes

You are going to have to weld it the best way is to create an attachment on where you want it.
To the put the frame as the attachment.

2 Likes

If you have 5 robux, you can buy the Tool Grip Editor plugin, It’ll make your life a lot easier.

2 Likes

Alright, and would the weld come off once the item is equipped or would I have to make it do that?

Thanks, I’ll make sure to try it out

You want it to still be welded when it is equipped again?? Or on their back

No, I mean like when it’s not equipped, it’s welded to the player’s back but when it is equipped would it stop welding? Because if it keeps welding it would be stuck and the player wouldn’t be able to attack. Or would I have to make it so that it unwelds when it’s equipped?

you will need to weld it to there back when they equip the item. and then destroy it when they unequip the item.

it can be done by clonning the item then welding the clone onto there backs, then destroying the clone from the back.

Yes you would have to destroy the weld, if you want it on the players back when equipped you should or where ever you want to place the tool use a tool grip editor such as this one : Tool Grip Editor - Roblox

So it’s only welded to their back when it’s unequipped, but when it is equipped I destroy the weld. How would do that cloning thing? do I do like

Tool = script.Parent

if Tool.Equipped == true then -- Or maybe Tool.Equipped:Connect(function() ?
Tool:Clone()
Tool.Handle.Weld:Destroy()

and if that’s correct what would I do from there? I’m not too familiar with cloning. I’m a rookie at coding

Alright I’ll try it, also would this make the tool visible to other players even when it’s unequipped?

If it’s a normal script

Tool.Equipped:Connect(function()
character = Tool.Parent
Tool.Unequipped:Connect(function()
-- make an attachment on the back of the torso or humanoid root part and parent it to the torso or root part.
-- clone the handle then put it in the character : NewHandle.Parent = character
-- then weld the new handle first and with the torso or root part second and for C0 use the cframe of the attachment.
      end)
end)

I’m a little confused now.
So how do I make the attachment? Do I do instance.new or do I create it in workspace?
And how would I attach it to the player’s back?

character.Torso.Position?

And when I clone the handle

 Tool.Hande:Clone() 

Do I change the name to NewHandle?

You do Instance.new and you can name whatever you want I just put that so you could know it is the new one. I would first try out where exactly you want it on the dummy before making it.

I tried it on the dummy so now I know exactly where I want to put it. But how do I put it on the player’s back?

Grip editing won’t give you the best results if the tool is supposed to be anywhere but the player’s hand. You should be attaching models to players independent of the tool other than the equip events.

My personal favourite method for attaching items to players is to use accessories and the attachment setup already found in players. You can use the method below to find out how you can attach things to players (in your case though, instead of RightGripAttachment, you’d be using BodyBackAttachment):

I made a semi-related post to a thread which involves attaching items on the player’s back and switching them to the hand to be held. You can follow the first part of the post which involves attaching items to the player’s back:

Naturally with this method you’d have to change around some of your code if you want to modify the bag or anything - that meaning you’d be accessing the accessory to apply your changes instead of the tool. Not too big of a switcharoo though, still manageable.

4 Likes
Tool.Equipped:Connect(function()
character = Tool.Parent
end)

Tool.Unequipped:Connect(function()
local Attach = Instance.new("Attachment")
Attach.Parent = -- Character:WaitForChild("torso or humanoid root part") 
Attach.Position = Vector3.new(-- where you chose it)
-- clone the handle and parent it
local Weld = Instance.new("Weld")
Weld.Parent = -- the new handle
Weld.Part0 = -- the new handle
Weld.Par1 = -- Character:WaitForChild("torso or humanoid root part") 
Weld.C0 = CFrame.new(attach.CFrame)--  or just attach.CFrame
      end)

I feel obligated to mention that your code is going to cause a memory leak which will be bad for the server in the long run. Every time the player equips this tool, an Unequipped connection would be made. So in addition to several uncleaned connections, you’re adding more.

Always separate your connections. If you have a connection in another one, then ideally there should be some guarantee that it gets cleaned whether by engine processes or your own code.

Tool.Equipped:Connect(function ()
    character = Tool.parent
end)

Tool.Unequipped:Connect(function ()
    -- Weld here.
end)

So like this? But just to be safe that the attachment doesn’t go inside of the torso instead of on the back, how do I change the position of it? Like add or subtract the x or y value

Tool = script.Parent
Handle = Tool.Handle

Tool.Equipped:Connect(function()
	Tool.Equipped:Connect(function ()
		character = Tool.parent
	end)

	Tool.Unequipped:Connect(function ()
		local atchm = Instance.new("Attachment")
		local weld = Instance.new("WeldConstraint")
		atchm.Position = character.Torso.Position --Like maybe character.torso.position.x - 5
		weld.Part0 = atchm
		weld.Part1 = Handle
	end)
end)	

No, I didn’t mean putting both those connections inside another Equipped event, I meant making them standalone. Remove the outer Equipped event.

As for the positioning stuff, that’s where you get an attachment in the Handle that’s named the same as an attachment in the character. You can then use their respective attachment CFrames as your C0 and C1 so the positioning would be handled automatically. Check those threads for more information.

Just to reiterate what’s already on those threads: suppose I have a backpack accessory (or a model) and I want to attach it to the back. There’s an attachment in the UpperTorso (for R15) called BodyBackAttachment and I want the backpack to line up with it. So I create an attachment called BodyBackAttachment in the backpack’s handle, position it how I want them just put it in the character.

If you wanted to weld it yourself, then you’d need to follow this principle:

  • Create a Weld. Must be a weld, not a WeldConstraint, because we need C0 and C1.
  • Part0 should be the root of the model (or in an accessory’s case, its Handle).
  • Part1 should be the limb you’re attaching to. It’s UpperTorso here.
  • C0 should be the CFrame of the attachment in Part0.
  • C1 should be the CFrame of the attachment in Part1.

Relevant:

(but again; same principle, just different attachment names to achieve your desired effect)