I am trying to write some code that would allow for my gun part to appear on my back when unequipped and appear normally when its equipped but whenever I tried welding the gun part to the players torso it didn’t appear on the players back at all, and nothing happened but the handle still worked.
local A37 = serverstorage["A-37X"]
local EK = serverstorage["E-K4"]
local clonedtool = A37:Clone()
local clonedtool2 = EK:Clone()
local clonedtoolonback = A37:Clone()
clonedtool.Parent = player.Backpack
clonedtool2.Parent = player.Backpack
if clonedtool.Equipped == false then
clonedtool.Position = Vector3.new(player.Character.Torso.Position)
local weld = Instance.new("WeldConstraint")
weld.Parent = clonedtoolonback
weld.Part0 = clonedtool.Handle
weld.Part1 = player.Character.Torso
end
Sorry for the delay, the weapon will be welded to the chest as that is where the constraint is being made, this is where our offset comes in, below is the image of the offset I use for my weapon, each weapon may differ depending on where you want it positioned on the back.
This is in a modulescript I’m using called ItemData
The only difference that could arise is how you are using a weld constraint whilst I’m using a motor6d, but I am mainly using motor6d’s as I animated the weapons
Only reason I didn’t go with that method was due to needing multiple different welding points, and wanted it to all be modular. That method is good though without having to make multiple attachments