Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can a player in my game change avatar to one I have created?

Asked by 4 years ago
Edited 4 years ago

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?

0
I really don't know anything about it, but this might help you https://developer.roblox.com/en-us/api-reference/property/Player/CharacterAppearanceId Block_manvn 395 — 4y
0
And yeah, LocalPlayer is better. Block_manvn 395 — 4y
0
@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. Tommmmmey 13 — 4y
View all comments (3 more)
0
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. Tommmmmey 13 — 4y
0
Sooooooooooo, I can't help you, sorry. Why don't you ask someone on Discord. Block_manvn 395 — 4y
0
Hehe... no prob. Thanks for your effort! Tommmmmey 13 — 4y

Answer this question