To expand, i created a tool that when you press it, it will fire an animation and make the other player take damage.
It says the players left leg is not a valid member of the character.
Here's the Local Script
local Animation = script.Animation
local Replicated = game:GetService("ReplicatedStorage")
local RemoteEvent = Replicated.Remotes.Punch
local Debounce = false
wait(2)
local Humanoid = game.Players.LocalPlayer.Character.Humanoid
script.Parent.Activated:Connect(function()
if not Debounce then
Debounce = true
local AnimationTrack = Humanoid:LoadAnimation(Animation)
RemoteEvent:FireServer()
wait(2)
Debounce = false
end
end)
Here's the server script:
local Tools = game:GetService("ReplicatedStorage"):WaitForChild("Tools")
local RemoteEvent = game:GetService("ReplicatedStorage").Remotes.Punch
local Animation = Tools.SuperPunch.PunchConnecter.Animation
wait(1)
RemoteEvent.OnServerEvent:Connect(function(player)
local Hum = player.Character.Humanoid
local AnimationTrack = Hum:LoadAnimation(Animation)
AnimationTrack:Play()
print("Hello!")
if AnimationTrack.IsPlaying then
local LeftArm = player.Character["Left Arm"]
LeftArm.Touched:Connect(function()
Hum:TakeDamage(10)
print("Damaged another player!")
end)
end
end

2 comments
aren't they using upperleftarm and lowerleftarm now??
yes, and also no, more on that in my answer