game.ReplicatedStorage.Remotes.Punch.OnServerEvent:Connect(function(player,damage)
for i,target in pairs(game.Workspace:GetChildren()) do
if target:FindFirstChild("Humanoid") and target.Parent.Name ~= player.Name then
if (target.Character.HumanoidRootPart.Position - player.Character.HumanoidRootPart.Position).magnitude <5 then
target.character.Humanoid.Health -= damage
end
end
end
end)
This i accually dont under stand why line 4 isn't working. here is the full error:
Character is not a valid member of Model "Workspace.tanQer8" - Server - Punch Server:4 Stack Begin - Studio Script 'ServerScriptService.Punch Server', Line 4 - Studio - Punch Server:4 Stack End - Studio
