This punching script won't work

Hey guys! I’m making this fighting game but my combat script isn’t working.
It says something like “LeftArm is not a valid member of Model”
here’s the script:

local Player = game.Players.LocalPlayer
repeat wait() until Player.Character
local Humanoid = Player.Character.Humanoid
local UIS = game:GetService("UserInputService")
local debounce = false
local Punch = script.Punch
local Punch2 = script.Punch2
local LeftArm = game.Players.LocalPlayer.Character["LeftArm"]
local Table = {LeftArm}

UIS.InputBegan:Connect(function(Input, IsTyping)
	if IsTyping then return end
	if not debounce then
		debounce = true
		if Input.KeyCode == Enum.KeyCode.Z then
			local PunchTrack = Humanoid:LoadAnimation(Punch)
			PunchTrack:Play()
		end
		wait(1)
		debounce = false
	end
end)

local RmtEvent = game.ReplicatedStorage.Punch

for i,v in pairs(Table)do
	v.Touched:Connect(function(hit)
		if hit.Parent:FindFirstChild("Humanoid")then
			RmtEvent:FireServer(hit.Parent)
		end
	end)
end

Is there any errors I’ve placed? Any corrections I need to put in?

Can I ask if you’re using R6 or R15 for the player model? Just a quick google showed that for R15 the left arm model is multiple parts so it isn’t just called left arm.
Sorry if you already knew this, just trying to help out for once.

Edit1: If you are using R15 and want to use R6 you can disable it in the game’s develop options (configuring yout place)

1 Like

I am using R6 for your information! :smiley:

Isnt the left arm part called [“Left Arm”]?

image

1 Like

ok thanks! I will see and try this correction! :smiley:

1 Like

@PixelIGPM8 thanks! it worked! :smiley:

2 Likes

No problem! :slightly_smiling_face: