I tried using this script but I feel like it's outdated.
script.Parent.Text = game.Players.LocalPlayer.Name
I don't know what I'm doing wrong, do I have to change the code or set the TextLabel's name to something else?
if ur using a script you need at least a remoteevent or something that returns the players name if ur using a localscript ur code is perfect
--hab a good day
You need to put this code in a localscript since it is the only type of script that can access PlayerGui and the Player itself.
local player = game.Players.LocalPlayer while wait() do script.Parent.Text = player.Name end
This script will constantly update the label with the player name. Let me know if it doesn't work.
What you have to write is
script.Parent.Text = game.Players.LocalPlayer.Humanoid.DisplayName
i went from the script you gave but this should work. i also fixed it from last time but try this!