From aca2a00d0a45c7a9ce1e2e8aebe3b74e5d6e7f77 Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Fri, 28 May 2021 05:20:47 +1000 Subject: [PATCH] fix(client/main): Check if skin is defined, else if skin does not have a second key --- client/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/main.lua b/client/main.lua index 97e1e6c1..48857f8b 100644 --- a/client/main.lua +++ b/client/main.lua @@ -118,7 +118,7 @@ if ESX.GetConfig().Multichar then end LoadPed = function(isNew) - if isNew or not Characters[Spawned].skin[2] then + if isNew or not Characters[Spawned].skin or not Characters[Spawned].skin[2] then local isMale, sex = true, 0 if Characters[Spawned].sex == 'Female' then isMale, sex = false, 1 end TriggerEvent('skinchanger:loadDefaultModel', isMale, function()