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

[Solved] How can i make a weld properly instead of the part appearing in the front of my character?

When i try to weld some wings to my character, they appear in front of the character instead of appearing in the back.

The code that i used:

local Test1 = Instance.new("Accessory")
local Player = workspace.PlayerHandler:WaitForChild("AlessandroG200") -- Gets my character
wait(0.01)
Test1.Parent = workspace.PlayerHandler:WaitForChild("AlessandroG200") 
local Part = Instance.new("Part", Test1)
Part.Name = "Handle"
Part.Orientation = Vector3.new(0, -86.5, 0)
Part.Position = Vector3.new(95.015, 57.3, 190.711)
Part.CanCollide = false
Part.Locked = true
Part.Size = Vector3.new(1.6, 0.8, 1.6)
local Weld1 = Instance.new("Weld", Part) -- This would make the weld
local Attach = Instance.new("Attachment", Part) -- I tried to use attachments
Attach.Position = Vector3.new(0,-0.3,-0.9)
Attach.Axis = Vector3.new(1,0,0)
Attach.SecondaryAxis = Vector3.new(0,1,0) -- Setting up the Attachment

Weld1.Part1 = Player.Torso
Weld1.Part0 = Part -- Would attach the torso with the wings
Test1.AttachmentForward = Vector3.new(0,0,-1)
Test1.AttachmentPos = Vector3.new(0, 0.34, 0.25)
Test1.AttachmentUp = Vector3.new(0,1,0)
Test1.AttachmentRight = Vector3.new(1, 0, 0) -- This would set the acessory attachments
local Mesh = Instance.new("SpecialMesh", Part)
Mesh.MeshId = "rbxassetid://744691873"
Mesh.MeshType = "FileMesh"
Mesh.TextureId = "rbxassetid://744692038" -- The wings code
Mesh.VertexColor = Vector3.new(1,1,1)

1 answer

✓ Accepted answer

From what I can see, your attachments aren't actually linked to anything. I can give more insight into the welds, however.

When you make a weld with Instance.new("Weld"), it'll be blank. When you add the Part0 and Part1, it'll attach to the centre of Part0. To move the wing, you'll need to use Weld.C1 = CFrame.new() and do some moving around of the coordinates until you find the right area. (I also suggest making the weld be parented by the torso and its Part0 being the Torso)

If this was a bit confusing, checking the wiki page might be handy.

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