PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

LoadCharacterBlocking

The LoadCharacterBlocking Player function is similar to Player/LoadCharacter, but the request is processed synchronously instead of asynchronously.

This means that no other task will be able to continue until after the character has been loaded, including the rendering of the game and any other tasks.

Like LoadCharacter, this function creates a new character for the player, removing the old one. It also clears the player’s Backpack and PlayerGui. This is useful in cases where you want to reload the character without killing the player, such as when you want to load a new character appearance after changing the player’s Player.CharacterAppearance.

Notes

  • This function is used by Roblox’s backend server when rendering avatar thumbnails.

Returns

Return Type Summary

No return.


Code Samples


This example demonstrates the Player/LoadCharacterBlocking function.

First, the script changes the local player’s appearance by changing the Player/CharacterAppearance property to the userId 772462. Then, the script fires the LoadCharacterBlocking function to reload the player’s character with the new appearance.

##Notes

  • This function cannot be used in scripts, but is usable in the command bar. As such, this example will only work as expected when fired from the command bar.
  • Since this function executes asynchronously, the script will not continue execution until the function finishes.
local player = game.Players.LocalPlayer

player.CharacterAppearanceId = 772462
player:LoadCharacterBlocking()