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

Will an account still have the same userID if it changes its username?

Asked by 9 years ago

I'm messing around with Data Stores, and while I was doing stuff with it, I realized that if I checked for a username, anybody who changed their username would lose their data.

So to circumvent this, will an account still have the same userID if it changes its username? If not, is there another way to keep track of that account?

0
Yes, it will still have the same UserId even if the User changes their username. TheeDeathCaster 2368 — 9y
0
Thank you! evolvedpikachu 40 — 9y

1 answer

Log in to vote
1
Answered by 9 years ago

Yes!

An account can change it's username up to 50000000000 times but it will still have the same userId. This presents a more accurate way of keeping track of certain players via Datastore and other services!

Each player has a property called userId, which is an integer value that is READONLY. I'm pretty sure if it was Writable, we'd have some issues....

game.Players.PlayerAdded:connect(function(player)
     print(player.userId)
end)

More Information:

http://wiki.roblox.com/index.php?title=API:Class/Player/userId

0
Ooooohhhh fancy "yes", thanks evolvedpikachu 40 — 9y
Ad

Answer this question