Im making a Login Page where Player need to login.
I can access the Player Data with player. when the Player is inside the Game but when he is not inside the game i cant use player..
How can I change the name of the data?
Like when the Player creates a UserName the username will be like afiawf@gmail.com or GamerRoblox1232 and the Name will be the Data Name or i dont know
If you are trying to get the username of the player which you know the name of, you can always use the functions of Players such as GetNameFromUserIdAsync . See the documentation for other info.
No i dont know the username, so if the Player creates a Account in my Game, logout from the Roblox Account where he created the Account, login in another Roblox Account, enter my Game and when he login with the created Account in my Game he has his Data there. But how can i access the Data then?
If, like @MiriVokrium said, you are using a DataStore just use make your key something along the lines of Player_USERIDHERE.
You should really be using the UserId of a player at some point in your key, this is data that does not change about a player. However, if you begin using data like the Name then that is a property that can change, meaning data could be lost unnecessarily.
However, I don’t see why you’d need to access the data about someone without knowing their username?