RespawnScript in StarterCharacterScripts
local plr = game.Players.LocalPlayer
local char = script.Parent
local humanoid = char:WaitForChild("Humanoid")
humanoid.Died:Connect(function()
game.ReplicatedStorage.LoadChar:FireServer(plr)
print("Char loaded.")
end)
Script in ServerScriptService
local items = game.ReplicatedStorage:WaitForChild("Characters")
game.ReplicatedStorage.LoadChar.OnServerEvent:Connect(function(plr)
plr:LoadCharacter()
print(plr.Name)
local charClone = items.Chicken:Clone()
charClone.Name = plr.Name
local rootPart = charClone:FindFirstChild("HumanoidRootPart") or charClone:FindFirstChild("Torso")
local plrRoot = plr.Character:FindFirstChild("HumanoidRootPart") or plr.Character:FindFirstChild("Torso")
plr.Character = charClone
if rootPart and plrRoot then
rootPart.CFrame = plrRoot.CFrame
end
charClone.Parent = workspace
char = plr.Character
end)
This is what happens: https://youtu.be/X7syZpASTQA
