Currently, I am attempting to weld a melee weapon handle to the left arm of my character. However, when i run the code in game, the weld does not go through. Is it because of the wording of Left Arm in my script? If so, how do I correct this fault?
game.ReplicatedStorage.Manifest.OnServerEvent:Connect()
local Players = game:GetService("Players")
local function OnPlayerAdded(Client)
local Part = game.Workspace.Scythe.Handle
local Weld = Instance.new("WeldConstraint")
if Client.Character then
wait(0.5)
Part.Position = Client.Character["LeftArm"].Position
Part.Orientation = Client.Character["LeftArm"].Orientation
Weld.Parent = Client.Character
Part.Parent = game.Workspace
Weld.Part0 = Client.Character["LeftArm"]
Weld.Part1 = Part
else
Client.CharacterAdded:Connect(function()
wait(0.5)
Part.Position = Client.Character["LeftArm"].Position
Part.Orientation = Client.Character["LeftArm"].Orientation
Weld.Parent = Client.Character
Part.Parent = game.Workspace
Weld.Part0 = Client.Character["Left Arm"]
Weld.Part1 = Part
end)
end
end
Players.PlayerAdded:Connect(OnPlayerAdded)
