Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

This lightning death effect is not happening, any help?

Here is the script.

lua``` local Players = game:GetService('Players') local toolName = 'LightningSword'

Players.PlayerAdded:Connect(function(Player) Player.CharacterAdded:Connect(function(Character) local Humanoid = Character:WaitForChild('Humanoid') Humanoid.Died:Connect(function() if Character:FindFirstChild(toolName) or Player.Backpack:FindFirstChild(toolName) then

		local lightning = LightningEffect
			lightning vector = Humanoidrootpart
			properties = Anchored = true

humanoid can collide = false end end) end) end) ```

1 answer

First, look back to your other posts about kill effects. It doesn't seem like you are reading the other answers.

-- If you want a kill effect, you probably want to find the sword in the killer, not yourself.
Humanoid.Died:Connect(function()
local creator = Humanoid:FindFirstChild'creator' -- finds killer
if creator ~= nil then
	local killer = creator.Value
	if killer.Character:FindFirstChild(toolName) then -- see if sword is the right one.


-- lightning effect
lightning = LightningEffect -- doesn't do anything because we don't know what 'LightningEffect' is. maybe try Instance.new(something that looks like lightning) or clone something idk.

properties = Anchored = true -- should be lightning.Anchored = true (i don't know how vector works but should be somewhat similar.

This discussion is preserved as it was. New answers, comments, and votes are closed.