This part of the punch script will not work with R15 Characters

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Trying to make this punch script work with R15.

  2. What is the issue? When the player punches someone and it will not work with R15 Characters.

  3. What solutions have you tried so far? Change the code some more.

How to make this code below work with R15?

-- This code will only work with R6 but how to convent it to R15? I don't want to leak the rest of the code

-- This will just yeild for R15 Characters
Plr.Character:WaitForChild("Left Arm").Touched:Connect(function(hit)
	if hit["Parent"]:WaitForChild("Humanoid") and db and not damaged then
		if Plr["Character"]["Humanoid"]["Health"] > 0 then
			damaged = true
			Event:FireServer(hit["Parent"]["Humanoid"])
		end
	end
end)

-- This will just yeild for R15 Characters
Plr.Character:WaitForChild("Right Arm").Touched:Connect(function(hit)
	if hit["Parent"]:WaitForChild("Humanoid") and db and not damaged then
		if Plr["Character"]["Humanoid"]["Health"] > 0 then
			damaged = true
			Event:FireServer(hit["Parent"]["Humanoid"])
		end
	end
end)

Why can’t you just use FindFirstChild()? It’ll always result in infinite yields every time the Part touches a non-Player Part?

I’d recommend adding print() statements to check what works and what doesn’t

1 Like

It’s not that! It’s this.

-- This will yeild for R15 Characters. How to convent to R15? Plr.Character:WaitForChild("Left Arm").Touched:Connect(function(hit) or Plr.Character:WaitForChild("Right Arm").Touched:Connect(function(hit)

Oh I see, refer to this image then:

1 Like

Yea but what to change left arm and right arm to?

Experiment for it yourself, personally I’d think it’d be the LeftHand & RightHand objects

1 Like