RaycastHitbox damages own player?

  1. What do you want to achieve? Damage only player who is downed (Character) and not tool owner (PlayerCharacter)

  2. What is the issue? Everybody around the raycast area “hitbox” gets damaged along with tool owner.

  3. What solutions have you tried so far? I’ve heard theres an option with RaycastParms but i’m not sure…

	-- PlayerCharacter is the player stomping/finishing
	-- (Basically just tool owner.)
	local LocalPlayer = game.Players:GetPlayerFromCharacter(PlayerCharacter)
	local Humanoid = PlayerCharacter:FindFirstChildOfClass("Humanoid")
	local Animation = Resources.Animations.Finish

	local RaycastHitbox = require(game:GetService("ReplicatedStorage"):WaitForChild("Modules"):WaitForChild("RaycastHitboxV4"))
		local Hitbox = RaycastHitbox.new(Handle) -- Handlie is Tool.Handle (Hitbox area basically)
		local Animator = Humanoid:FindFirstChildOfClass("Animator")
		Hitbox.OnHit:Connect(function(hit, humanoid)

		if Animator then
			local AnimtionTrack = Animator:LoadAnimation(Animation)

			for _, player in pairs(Players:GetPlayers()) do
				if player.UserId == LocalPlayer.UserId then
				-- "Character" is the player dying/finished.
				local Character = player.Character
				local CharPlayer = game.Players:GetPlayerFromCharacter(Character)
				local HumanoidRootPart = Character:FindFirstChild("HumanoidRootPart")
				local OtherHumanoid = Character:FindFirstChildOfClass("Humanoid")
				local content = game.Players:GetUserThumbnailAsync(CharPlayer.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size150x150)

				if Character:FindFirstChild("Values").Ragdolled.Value == true and OtherHumanoid.Health >= 1 then
					-- Making sure Character (player getting stomped/downed)
					-- is near the tool owner (PlayerCharacter)
					local Distance = (HumanoidRootPart.Position - PlayerCharacter.PrimaryPart.Position).Magnitude

					if Distance < 7.5 then
						Humanoid.WalkSpeed = 1

						-- Once again Character is the player taking damage NOT PlayerCharacter
						-- (PlayerCharacter is the owner of the tool and player who fired the event.)
						Humanoid.WalkSpeed = 16
						-- "Character" player who got stomped is "dead".
						if OtherHumanoid.Health <= 0 then
							killedevent:FireClient(LocalPlayer, CharPlayer.Name, 25, content)
							-- Owner of tool is awarded
							LocalPlayer.leaderstats.TIX.Value += 25
							LocalPlayer.Stats.KillStreak.Value += 1
				           -- end
	end, warn)

There is a whitelist and a blacklist for parts the Raycast can hit here: RaycastParams as well as here: Intro to Raycasting

I tried that but is there any ways to make it blacklist EVERY character BUT the character whos ragdolled? (Keep in mind a boolvalue (true) is used to identify that the character is ragdolled.)

local Params = RaycastParams.new()
Params.FilterDescendantsInstances = {Character:FindFirstChild("Values").Ragdolled.Value == false, {PlayerCharacter}}
Params.FilterType = Enum.RaycastFilterType.Blacklist

Sorta like this.

Wouldn’t it just be easier to check if the character Humanoid.Ragdoll is true when the raycast hits them? That way if they aren’t then nothing happens. If they are then do the damage.

Alright i’ll try that, on the mean time, is it possible to use multiple filters for blacklisting?
Params.FilterDescendantsInstances = {Character:FindFirstChild("Values").Ragdolled.Value == false, {PlayerCharacter}}, like this.

I don’t think you’d even need to blacklist them. It probably would just add unnecessary code.
The Humanoid.Ragdoll is built in to the Player, so if you check if the Humanoid getting hit is in the .Ragdoll state then do your damage.