Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make kill effects specifically for different swords?

Asked by 2 years ago
Edited 2 years ago

Hello! So, I am trying to make a sword that will play a kill effect and I have the kill effect done. I can't figure out how to make the specific kill effect play on the player that died when someone kills them with a specific sword. I have tried to use this script:

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(Character)
        local creator = Character.Humanoid:FindFirstChild("creator")
        local playerkill = creator.Value
        if creator ~= nil and creator.Value ~= nil then
            if script.Parent.Name == "CandyCaneSword" then
                require(game.ReplicatedStorage.expandingPart)(workspace.playerkill)
            end
        end
    end)
end)

(this script is a normal script under the sword in starterpack) but nothing happens when I kill a player. If you need any scripts to help out I can provide them.

0
Do you mean like a particle? itsbboy 17 — 2y
0
No it's not a particle. It's a candy cane that comes down on the player and many candy canes are spawned. All I have to do is require the module script and it will play, I just can't figure out how to make it so the effect plays when someone kills a player with the specific sword. Clooouudy 20 — 2y

Answer this question