How would I make a Sword Kill Effect?

Ever since I started learning scripting I had a big interest in The Roblox Classic Swords. I’ve learnt how to change damage values and learnt what some functions do in them. And I saw how some sword fighting games have kill effects for each sword. E.g Fire Sword That burns the player and chars them when killed by the fire sword.

However When I tried searching for tutorials or resources on how I could make my own kill effect, I haven’t found and resource, video, or tutorial whatsoever on how I could make my own kill effect. I would like to ask you guys how you think I could make a sword kill effect That has cool effects when you kill a player. If you could show me any resources that may help me I would appreciate it a lot

3 Likes

This can be done using Humanoid.Died to detect if a player died. For example:

humanoid.Died:Connect(function()
		print("Humanoid Died")
end)

You can add a debounce to it to prevent it from spamming.

Where do you think I should put this in the sword script? I fell like if I put this anywhere the script may break

I am using the roblox classic sword script by the way

Right at the bottom of :TakeDamage(). For example:

humanoid:TakeDamage(Damage)
humanoid.Died:Connect(function()
	print("Humanoid Died")
end)

Alright Thank you for your help I will experiment with this and see if I can create a kill effect

Actually something like that could cause memory leaks, the method I’d recommend is this:

humanoid:TakeDamage(damage)
if humanoid.Health <= 0 then
	killEffect(humanoid)
end