Changing Humanoid's name leads to corescript errors

If you rename Humanoid in a Character, a core script related to Self View (selfie view) will error from time to time:

Error message/details
  16:53:29.653  CoreGui.RobloxGui.Modules.SelfieView.Utils.ModelUtils:92: attempt to index nil with 'IsA'  -  Client
  16:53:29.653  Stack Begin  -  Studio
  16:53:29.653  Script 'CoreGui.RobloxGui.Modules.SelfieView.Utils.ModelUtils', Line 92 - function getAnimator  -  Studio
  16:53:29.653  Script 'CoreGui.RobloxGui.Modules.SelfieView.Components.FaceClone', Line 212 - function updateClone  -  Studio
  16:53:29.653  Script 'CoreGui.RobloxGui.Modules.SelfieView.Components.FaceClone', Line 846  -  Studio
  16:53:29.654  Stack End  -  Studio

Repro

  1. Use this serversided script (or rename it through the Explorer):
Code
local Players = game:GetService("Players")

local function PlayerAdded(player: Player): ()
    local function CharacterAdded(character: Model): ()
        local humanoid = character:FindFirstChildOfClass("Humanoid")
        humanoid.Name = "Core"
    end    
    
    player.CharacterAdded:Connect(CharacterAdded)
    local character = player.Character
    if (character) then
        task.spawn(CharacterAdded, character)
    end
end

Players.PlayerAdded:Connect(PlayerAdded)
for _, player: Player in Players:GetPlayers() do
    task.spawn(PlayerAdded, player)
end
  1. Spawn in-game and wait a bit.
  2. Errors will start to appear in the console output from a core-script in CoreGui.

Demonstration

1 Like

This is just an acknowledgment announcement!

We’ve filed a ticket into our internal database for this issue and will start investigating, we will update you when we have further information.

Thanks for flagging!

We’ll look into this. There may be some reliance on the Humanoid being named Humanoid in some areas of the code, so it’s not a good idea to rename it, but we will look into making it not error in this case