Hi I am making this Combat system And I have ran into trouble I was making this R15 and then I changed my mind and decided to make it R6. But when I change RightHand Into Right Arm I am getting a error and the script breaks if there is any way to change the weld script tell me.
local function setUp(char)
local handle = fx.Handle:Clone()
handle.Parent = char
local m6d = Instance.new("Motor6D", handle)
m6d.Part0 = char.RightHand
m6d.Part1 = handle
m6d.C1 = CFrame.new(0,.125,0)
local model = fx.MeshPart:Clone()
model.Parent = workspace.Fx
local weld = Instance.new("Weld", model)
weld.Part0 = handle
weld.Part1 = model
weld.C1 = CFrame.new(-0.20,-0.25,2.25) * CFrame.Angles(math.rad(0),0,80)
end
for i,v in pairs(game.Players:GetChildren()) do
repeat wait() until v.Character
setUp(v.Character)
v.CharacterAdded:Connect(function(char)
char:WaitForChild("Right Arm")
setUp(char)
end)
end
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
char:WaitForChild("Right Arm")
setUp(char)
end)
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.