How to fix position when welding an object?

Im creating a system where custom made accessories can be welded to body parts(because the normal accessory weld dont have one for legs) and Im running into this issue where when the “accessory” is welded to the body part, its position go back and up a little bit and not on the leg where its supposed to stay.

local players = game:GetService("Players")

local LegHolster = game.ServerStorage.Part

local function AddAccessories(player)
    local character = player.Character

    if not character then
        return
    end

    local Holster = character.Head:FindFirstChild(LegHolster.Name) or LegHolster:Clone()
    character.Humanoid.WalkSpeed = 0
    Holster.Parent = character.LeftUpperLeg
    Holster.Position = character.LeftUpperLeg.Position
    wait(2)
    Holster.Weld.Part1 = character.LeftUpperLeg
    Holster.Anchored = false
    wait(3)
    character.Humanoid.WalkSpeed = 16
end

players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function()
        wait(3)
        AddAccessories(player)
    end)

    player:GetPropertyChangedSignal("Team"):Connect(function()
        wait(3)
        AddAccessories(player)
    end)
end)

Have you tried attaching to the LeftLowerLeg/RightLowerLeg instead?

When making a Weld | Roblox Creator Documentation you have to specify both Part0, Part1, C0 and C1 of the weld.

Dont you only have to specify Part0 Part1 and the Parent for it to work?

In the first paragraph of the Weld link I posted:
Two CFrames , C0 and C1 , then determine how the parts should be placed.

1 Like