It is easier, faster, no need to script and it keep object position and orientation.
Place your mesh where you want it to be, then select the mesh and the part on which you want to weld the mesh at (ctrl + click to select both), go to the plugin tab and click on “Weld All”
All objects you insert and remove from the character should be a tool or an accessory, dirrectly welding a mesh to a character body part using a script is useless.
Accessories and tools exist specially for this case, it is easier as all you have to do is to clone or delete the accessory or tool.
Then you can do 2 accessories, one which is on your neck and the other on your hand, and switch them when equiping it.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local AccessoryFolder = ReplicatedStorage:WaitForChild("Accessories")
local NeckCamera = AccessoryFolder and AccessoryFolder:WaitForChild("NeckCamera")
local HandCamera = AccessoryFolder and AccessoryFolder:WaitForChild("HandCamera ")
local function SwitchCamera(State, Character)
-- true = equip on hands / false = equip on neck
local CurrentCamera = nil
local NewCamera = nil
if State == true then
CurrentCamera = Character:FindFirstChild("NeckCamera")
NewCamera = HandCamera and HandCamera:Clone()
elseif State == false then
CurrentCamera = Character:FindFirstChild("HandCamera")
NewCamera = NeckCamera and NeckCamera:Clone()
end
NewCamera.Parent = Character
if CurrentCamera then
CurrentCamera:Destroy()
end
end
SwitchCamera(true, Player.Character)