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

Need help cloning something when player dies?

Asked by 8 years ago

So I've been trying for a couple days now to get something to clone to the characters position when they die, kind of like a 'Kill Confirmed' game mode.. The code I have is below, and it doesn't work. Help?

game.GetService('Players').PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        character:WaitForChild("Humanoid").Died:connect(function()
            local tags = game.ReplicatedStorage:WaitForChild("Dogtag"):clone()
            tags.Parent = game.Workspace
            tags.Position = character.Torso.Position
        end)
    end)
end)

(Yes, Dogtag is the name of the item, and yes, it is in ReplicatedStorage)

0
Try changing the .Position(s) on line 6 to .CFrame. No clue if it would work, but the rest of your code seems perfectly fine. Uglypoe 557 — 8y

Answer this question