I am getting an error in my punch script that says: Character is not a valid member of Terrain "Workspace.Terrain"
not sure how to fix this, but it might be because the characters I am using are R15 and I am also using the terrain feature.
Here is the server script where I am getting the error
game.ReplicatedStorage.Remotes.Punch.OnServerEvent:Connect(function(player, damage)
for i, Target in pairs(game.Workspace:GetDescendants()) do
if Target.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)
