Please help: The current identity (2) cannot set a Character's name (lacking permission 4)

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)
3 Likes

You cannot change the player character’s name.
And after plr:LoadCharacter() the current player character will be inactive, that is, everything code after that is unlikely to work.

1 Like