Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I made a backpack, how do i have it so it stays on the back of a character?

I made this backpack that i wanted to stick on the back of all characters in the game from the start. How would i do this.

2 comments

0

maybe make it a hat? and put it inside of a character when they enter the game or respawn?

0

you can do like rareheaddress and make of it a hat, or you can make of it by example a CSG model and weld it to the player's torso

2 answers

✓ Accepted answer

You can do that by creating a weld and changing the CFrame of the Backpacks PrimaryPart.

5 comments

0

ok I'll try and see what i can do, thanks for helping me

0

may i ask what do you mean by a weld? also should the backpack be a tool?

0

No, make the backpack a normal model or Union or whatever. You should make a script that uses the Touched Event. For welding help, use this to learn how to use it. https://www.youtube.com/watch?v=eBMWLUAgNMs

0

You should weld the backpack to the Players Torso, just set the CFrame up to get it on their back.

0

k thanks

You could create a weld. You didn't exactly provide that much information, although I'm going to assume your backpack is a model. I'm also assuming that you're moving the model into the player's character. This script would be put inside of the model:

-- Backpack model should be inside of the player's character
for i,v in pairs(script.Parent:GetChildren()) do -- Creates a for i,v in pairs() loop
	if v.ClassName ~= "Script" then -- Checks to see if the current item is not a script
		local weld = Instance.new("Weld", v) -- Creates a new 'Weld' instance
		weld.Name = "Weld" -- Names the weld to 'Weld'
		weld.Part0 = script.Parent.Parent.Torso -- Sets Part0 of the weld to the torso
		weld.Part1 = v -- Sets Part1 of the weld to the current item in the for loop
		weld.C0 = script.Parent.Parent.Torso.CFrame:inverse() -- Sets C0 to the CFrame inverse of the torso
		weld.C1 = v.CFrame:inverse() -- Sets C1 to the item's CFrame inverse
	end
end

This discussion is preserved as it was. New answers, comments, and votes are closed.