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

How you weld a part to the player a certain distance away from them?

What i'm trying to achieve is I am trying to

On a function Set part's parent to a character Make new weld instances Have the part welded about 2 in front of the character's torso The part has CanCollide turned ON for different reasons So I can't have it in the character's torso else it will break the character

I've tried to use a mesh that places it slightly in front This works VISUALLY, but the part still collides INSIDE the torso

local new = dp
		new.Parent = character
		new.CFrame = character.UpperTorso.CFrame * CFrame.Angles(0,0,0)
		local weld = Instance.new("Weld") 
		weld.Part0 = new
		weld.Part1 = character.UpperTorso
		weld.C0 = new.CFrame:inverse() 
		weld.C1 = character.UpperTorso.CFrame:inverse() 
		weld.Parent = new

I have all of the locals set up already so no need for that

I am trying to weld it in front of the character.

1 answer

✓ Accepted answer

Instead of

new.CFrame = character.UpperTorso.CFrame * CFrame.Angles(0,0,0)

You can try

new.CFrame = character.UpperTorso.CFrame * CFrame.new(0,0,-2)

to poaition the part 2 studs in front of the UpperTorso, and if the part still collides and iterferes with the character, you could look into using collision groups.

2 comments

0

I've set up a collision group for both the part and the players uppertorso, but still when the part gets added in, the character freezes in mid air, stuck.

0

You should unanchor the part that you weld.

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