Hi there, scripters! I'm having a problem with a weld (that is created through Instance) in my game. When you equip a tool, a weld is created, where Part0 is the player's torso and Part1 is the player's left arm. Once the tool is unequipped, this weld is deleted, and the player's left arm naturally positions itself to its former position. When tested on a server, the weld accordingly works, but the player's left arm falls into the ground. Any help is appreciated, thanks!
In case you need the script, here it is (it's server-sided):
function script.Parent.WeldArm.OnServerInvoke(player,equipped,position,angles)
if equipped == true then
local weld = Instance.new("Weld")
weld.Part0 = player.Character.Torso
weld.Parent = player.Character.Torso
weld.Part1 = player.Character:FindFirstChild("Left Arm")
weld.C1 = position * angles
else
if equipped == false then
player.Character.Torso:FindFirstChild("Weld"):Destroy()
end
end
end

8 comments
RemoteFunction are required to return a value. Since you're not returning use a RemoteEvent.
Okay, would this fix the problem?
Im not sure. But try it. Also, line 9 is unnecessary as the 'else' keyword does this for you, and == true/false is not needed either.
I just added it, in case I wanted to reposition the arm while reloading the weapon. This way the "equipped" argument wouldn't be necessar
This didn't fix the problem, but thanks for the help anyways
Returning value has nothing to do with the problem, but there is other methods, try using CJ and C0, meaning try using CFrame:Inverse with the object you wish to weld
Frame:Inverse() doesn't seem to work...
*CFrame