Say I wanted to use a player's name in a script, but obviously won't know the name of them how would I do it? Would I have a variable that is equal to the player's name who touched the part?
There are multiple ways of finding the player's name.
This script is a normal script:
script.Parent.Touched:connect(function(player) print(player.Parent.Name) --This would print the name of the person who touched the brick end)
For LocalScripts, its 1 line of code.
game.Players.LocalPlayer.Name
eg (LocalScript)
print(game.Players.LocalPlayer.Name) --> Output: Player's Name
I hope that I've answered your question :D