How to put this part infront of the players torso (welding)

https://gyazo.com/9b89fd5993330d77a98ddab195a7864e

its a simple code i just dont know how to put it infront of the player

1 Like

Add some offset of the part’s position relative to the torso. Usually you want to have the offset based on the Torso's LookVector on CFrame. It can’t be much difficult than that. Then you weld after positioning, not before.

How do i have the offset based on the torsos lookvector though

Use Torso.Position and add Torso.CFrame.LookVector(multiplied by distance).

like this?

Oops, Torso.CFrame is a CFrame, not Vector3. Use Torso.Position or Torso.CFrame.Position, which are virtually the same.

No, not exactly. Use something like:
target.Position = Torso.Position + (Torso.CFrame.LookVector * 0.5)
Change 0.5 to any number in offset.

For orientation, just copy the torso’s orientation over to target.

1 Like

image
for the most part it probably worked but the weld still messes up the position and creates the same situation as in the gif

Actually, use a WeldConstraint instead. I think the old weld requires you to set an offset on C0 and C1, which is somewhat more tedious.

2 Likes

thank you so much for the help :smile:

1 Like