I just want to clone a part into the player after they die, the problem is, the part disappears when the player respawns, any help?
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local Children = character:GetChildren() character:WaitForChild("Humanoid").Died:Connect(function() wait(2) local clone = game.ReplicatedStorage.Link clone.Parent = character wait(0.1) end) end) end)
Here's your answer:
game:GetService("Players").PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(chr) chr:WaitForChild("Humanoid").Died:Connect(function() local Part = nil -- Replace nil with part directory, e.g. game.Workspace.Part local PartClone = Part:Clone() PartClone.Parent = chr end) end) end)
Remember to always search Roblox Dev first, https://developer.roblox.com/en-us/api-reference/event/Humanoid/Died