Hi
When a player has 200 wins in my game I want to unlock an avatar for the player to use in-game. I have created my own personal avatar that works fine and is very much linked to the game.
How would you start a script allowing the player to change to the game avatar?
After some googling I found something like this:
local player = game.Players.'currentPlayerName' (or localplayer I guess)
player.CharacterAppearanceId = 156
player:LoadCharacter()
But where can I find the CharacterAppearanceId for my newly made Avatar?

7 comments
I really don't know anything about it, but this might help you https://developer.roblox.com/en-us/api-reference/property/Player/CharacterAppearanceId
And yeah, LocalPlayer is better.
@Block_manvn: Thanks for your answer, but this will only get the characterId of another player. The thing is that I need to link it to the avatar I have created and lays in a folder somewhere in my solution.
Wait, I think this is better https://developer.roblox.com/en-us/api-reference/property/StarterPlayer/LoadCharacterAppearance
Well, that is for every player to spawn as my Avatar. And that is not actually what I want. I want the user to go into inventory and click on the avatar he has unlocked and then change to that avatar in-game.
Sooooooooooo, I can't help you, sorry. Why don't you ask someone on Discord.
Hehe... no prob. Thanks for your effort!