Kill Effect apply on the another player

  1. how to make kill effect affect on killed player?

  2. i tried to get the hitted target on the sword but it not worked

Can You Guys Make that for me
script:

game.ReplicatedStorage.DiedRE.OnServerEvent:Connect(function(plr)
	
	local char = plr.Character or plr.CharacterAdded:Wait()
	local humanoid = char.Humanoid
	
	char.HumanoidRootPart.Anchored = true
	
	local cloneEffect = rs.Effects.Light:Clone()
	
	--//EffectFunction//--
	local function SnowEffect()
		local p = char: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(char:WaitForChild("Torso"), fadeTI, {Color = Color3.new(0.27451, 0.65098, 0.827451)}):Play()
		end
		cloneEffect.Parent = char.HumanoidRootPart
		cloneEffect.Position = char.HumanoidRootPart.Position
	end

	for i, d in ipairs(char:GetDescendants()) do		

		if d:IsA("BasePart") or d:IsA("Decal") then

			spawn(function()
				if char:WaitForChild("Values").Effect1.Value == true then
					SnowEffect()
				end
			end)
		end
	end
	wait(5)
	
	plr:LoadCharacter()
end)

thanks

1 Like

To get the hit target for the sword, you could set up a hitbox for the sword and use a Touched event like the following in a script parented to the sword tool:

script.Parent.Hitbox.Touched:Connect(function(touchedObject)
   -- do whatever you need with the object that touched the sword (touchedObject)
end)

I’m not sure how to do kill effects.

this not worksi tryed it but it not worked sadly

Oh, I’m not sure what else to do then. Sorry.

1 Like