Here's my code in a server script:
local Players = game:GetService("Players") Players.PlayerAdded:Connect(function(player) local char = player.Character or player.CharacterAdded:Wait() local clone = char:Clone() local root = clone:WaitForChild("HumanoidRootPart") local char1 = workspace:WaitForChild("char1") root.CFrame = char1:WaitForChild("HumanoidRootPart").CFrame end)
I've tried so many things that I just cannot remember anything I've tried. Here's the error that pops up: ServerScriptService.Script:6: attempt to index nil with 'WaitForChild'. Apologies if this is a stupid question, this has just been bothering me so much.
Player Character models are not archivable by default; if you set it so they are, then it would not be nil.
Here is a script you can put in the workspace that will make characters archivable by default
game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function() plr.Character.Archivable = true end) end)