I’m trying to set a player’s character onto a rig every time they spawn, but it’s not working and i get this error.
Script: Regular script in serverscriptservice
local Rig = game.ServerStorage.Rigs.Female
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
if not char:FindFirstChild("Char") then
local character = Rig:Clone()
char.Name = plr.Name
plr:LoadCharacter()
char = character
char.Parent = workspace
local id = plr.UserId
local name = game.Players:GetNameFromUserIdAsync(id)
local humanoid = character:WaitForChild("Humanoid")
local appearance = game.Players:GetHumanoidDescriptionFromUserId(id)
humanoid:ApplyDescription(appearance)
end
end)
end)