How I can make one tool kill effect?

I am testing things on studio and I test to make one kill effect script for my tool (its not local script)
and the script looks like this:

local killThing = game.ReplicatedStorage.TestEffect


tool.Blade.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Humanoid.Health <= 0 then 
		print("dead")
		killThing:Clone()
		KillEffect.Parent = hit.Parent
	end
end)

It prints(“dead”) but doesnt change the KillEffect Parent.

Any Idea?

Do you make Variable about KillEffect or u just missed

killThing:Clone()
killThing.Parent = hit.Parent

The problem its on the parent I guess.

Do I have to get the HumanoidRootPart from the character?

I’m assuming so. Hit.Parent would be the player, if I’m not mistaken. Try getting the humanoidrootpart from the Character of the player. And then parent the effect to that part

alr I will try that I am sure I have to use humanoidRootPart

1 Like