Hello, I’m trying to make the player’s body drop when he dies just like murderer mystery 2 but I’m kind of confused about how character cloning works. How do I do that with a script?
Thank you!
2 Likes
I just found a solution since my game has a starter character I just Clone the starter character when the player dies here is my code:
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
character.Humanoid.Died:Connect(function()
local body = game.ReplicatedStorage.Body:Clone()
body.Parent = workspace
body:SetPrimaryPartCFrame(character:GetPrimaryPartCFrame()*CFrame.fromEulerAnglesXYZ(0,90,0))
end)
end)
end)
2 Likes