Hello,
I try to change the skin to the player but it does not work, yet I have the impression that the code is good and I do not see the error, could someone help me?
function ChangeToSkin(skin)
local model = GetHashKey(skinName)
RequestModel(model)
while not HasModelLoaded(model) do -- Wait for model to load
RequestModel(model)
Citizen.Wait(0)
end
SetPlayerModel(PlayerId(), model)
SetModelAsNoLongerNeeded(model)
end
Thanks you