Kill Effect Hit Problem

its not effecting the killed player

so when i do a humanoid.Died function and fire the bindable event it not affects it it anchor its but it not affect it

kill effect script

local ts = game:GetService("TweenService")
local fadeTI = TweenInfo.new(5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
local particlesTI = TweenInfo.new(2, Enum.EasingStyle.Quint, Enum.EasingDirection.InOut)
local rs = game:GetService("ReplicatedStorage")


game.Players.PlayerAdded:Connect(function(plr)
	
	plr.CharacterAdded:Connect(function(char)
		task.wait()
		local humanoid = char:WaitForChild("Humanoid")
		humanoid.BreakJointsOnDeath = false
		char.Parent = game.Workspace.Chars
	end)
end)



game.ReplicatedStorage.Event:Connect(function(plr, target)
	
	local chr = target.Parent
	local humanoid = chr.Humanoid
	local gui = plr.PlayerGui.Main
	
	chr.HumanoidRootPart.Anchored = true
	
	local cloneEffect = rs.Effects.Light.Attachment:Clone()
	
	--//EffectFunction//--
	local function SnowEffect()
		local p = chr:GetDescendants()
		for _, char2 in ipairs(p) do
			if char2:IsA("BasePart") then
				char2.Anchored = true
				ts:Create(char2, fadeTI, {Color = Color3.new(0.27451, 0.65098, 0.827451)}):Play()
			end
			if char2:IsA("Shirt") or char2:IsA("Pants") then
				ts:Create(char2, fadeTI, {Color3 = Color3.new(0.27451, 0.65098, 0.827451)}):Play()
			end
			ts:Create(chr:WaitForChild("Torso"), fadeTI, {Color = Color3.new(0.27451, 0.65098, 0.827451)}):Play()
		end
		cloneEffect.Parent = chr.HumanoidRootPart
	end

	SnowEffect()
	
	humanoid:UnequipTools()
	wait(4)
	plr:LoadCharacter()
end)

Sword Script

local rs = game:GetService("ReplicatedStorage")
local rc = require(rs:WaitForChild("Modules").RaycastHitboxV4)


local newHitbox = rc.new(script.Parent.Handle)

newHitbox.OnHit:Connect(function(hit)
	hit.Parent.Humanoid:TakeDamage(50)
end)

script.Parent.Activated:Connect(function()
	script.Parent.Handle.Touched:Connect(function(hit)
		hit.Parent.Humanoid.Died:Connect(function()
			rs.Event:Fire(hit)
		end)
	end)
	newHitbox:HitStart(2)
end)

Please Help me

Okay, it looks like it is only connecting when the handle is touched(u are using a raycast hitbox).
I would just check if the player hit would be under 0 health after the damage is done, and then fire your event thingie if they would be ded.

1 Like

Thank You So Much Thanks for the script

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.