Issue when trying to change a player's character clone name

Hey!

I am trying to clone the player’s character and name it to: room.ID . . player.Name

But the error ( The current identity (2) cannot set a Character’s name (lacking permission 4) ) is showing up in the console, I haven’t found any posts with that. How can I give this necessary permission?
Code (LocalScript):

local character = player.Character or player.CharacterAdded:Wait()
character.Archivable = true
local characterClone = character:Clone()
				
characterClone.Parent = game.Workspace
character.Name = room.ID .. player.Name -- error line

You are setting the characters name, not the clone

2 Likes
local character = player.Character or player.CharacterAdded:Wait()
character.Archivable = true
local characterClone = character:Clone()
				
characterClone.Parent = game.Workspace
characterClone.Name = tostring(room.ID)..player.Name
1 Like

How did I not see this? :sweat_smile: Thank you so much!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.