your function seems fine (albeit the limbs will probably be distorted when it works but thats a problem for later). The problem is that you are not firing the function properly
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local function onCharacterAdded(character)
character:WaitForChild("HumanoidRootPart")
character.Archivable = true
local rig = character:Clone()
for _, descendant in pairs(rig:GetDescendants()) do
if descendant:IsA("Script") or descendant:IsA("LocalScript") then
descendant:Destroy()
end
end
rig.HumanoidRootPart.CFrame = workspace.RigPos.CFrame
for _, descendant in pairs(rig:GetDescendants()) do
if descendant:IsA("BasePart") then
descendant.Size = descendant.Size * 10
descendant.Anchored = true
end
end
rig.Parent = workspace
end
player.CharacterAdded:Connect(onCharacterAdded)