how do I assign a variable that refers to the player's character that is using a gui and works in-game. How do i make it so the player can type numbers in a gui and that number will be a value in a certain datatype? Thank you.
Okay, I don't know what a datatype is, but I can surely tell you how to assign a variable to your player.
What your looking for is a connection, they are very simple. Basically, you are going to use PlayerAdded so that it searches for every player that has joined the game.
Here is the code you would use...
game.Players.PlayerAdded:connect (function(plr) -- Your code here end)
How to use:
1. Where you see (plr) that is a bit like the variable. You will use it to define the connection and in your case, your player. You can change it to whatever you would like.
2. Your code should go inside of the connection
NOTE: IF YOU ARE USING A LOCALSCRIPT, JUST USE LOCALPLAYER NOTE: THIS IS FOR THE LOCALPLAYER, NOT FOR OTHERS