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

How to weld a part onto a players body?

I'm not trying to constantly ask for help because I'm trying to learn. I watch tutorials but still, things don't work. I'm creating a pair of wings that will go onto players back. The wings are decals posted on to two flat parts. I've added a handle, welded the parts to the handle and then added an attachment and named it "BodyBackAttachment". Then placed the handle with the parts into an accessory. I put the accessory in rep storage just so that when I got to the test it I can easily move it to my player model in the workspace. But whenever I do that, it just gets placed where it last was when I placed it in rep storage. Again I followed all the instructions and changed things but still no progress. anyone can assist me with what I'm doing wrong.

2 comments

0

Are you doing this manually or are you using a script?

0

manually

1 answer

if you want to just weld a part - or a basepart- to a player's character, then you can simply do the following

local part = part -- the part you want to weld 
local char -- pre definition
game:GetService("Players").PlayerAdded:connect(function(player)  -- change to an event in which a player gets the part welded to them
	char = player.Character
	local hum_part = char:WaitForChild("HumanoidRootPart")
	
	if hum_part  then
		local clone = part:Clone()
		clone.Parent = char
		
		local weld = instance.new("weld", hum_part)
		weld.Part0 = weld.Parent
		weld.Part1 = clone
		
		weld.C0 = hum_part.Cframe	-- you might have to change this to suite parts orientation
		weld.C1 = Cframe.new(0,0,0)
	end
end)

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