I am very mad right now because there has been this ongoing bug in my game that has just caused everyone to not be able to play and my game just went from 200 - 15 players because of it.
GetCharacterAppearenceAsync() has a chance of not working, which would normally be fine. But in this case, when it errors, it causes one of my scripts to completely lock up!
Here’s my code
for _,PlayerInfo in pairs(Players) do
local CharacterAppearence = nil
local Success, ErrorMessage = pcall(function()
CharacterAppearence = game.Players:GetCharacterAppearanceAsync(PlayerInfo["key"].UserId)
end)
if Success then
-- code
end
end
For some reason, when this error happens, EVEN THOUGH IT’S WRAPPED IN A PCALL, the entire script seizes to work. Does anyone know what’s going on here?
So if the appearance is essential then it will stop the rest of the script from functioning along with any that require the appearance, you also arent retrying the pcall if it fails, if it is an absoloute for your game then do a while nil loop on appearance to retry until it works.
local CharacterAppearence = nil
while CharacterAppearance == nil do
local Success, ErrorMessage = pcall(function()
CharacterAppearence =
game.Players:GetCharacterAppearanceAsync(PlayerInfo["key"].UserId)
end)
if Success then
-- code
end
wait(3)
end
then why give the appearance script if its unrelated, the issue must be something else, add prints at core points of your script to check script progress and see where it goes wrong
Players:GetCharacterAppearanceAsync() failed because HTTP 500 (Internal Server Error) | ServerScriptService.GameHandler, line 230 - function PlacePlayersOnStage ServerScriptService.GameHandler, line 600 | GameHandler