game.Players.PlayerAdded:Connect(function(plr) wait(1) game.StarterGui.StarterGui.PlayerName.Text = game.Players.LocalPlayer.Character.Name end)
I've tried so many different things to change it, but it never worked. I'm using a local script because I'm trying to make a loading screen GUI kind of.
Try puting this local script in your screengui:
local player = game.Players.LocalPlayer --Using PlayerAdded is deprecated, user LocalPlayer instead. player.PlayerGui.[Your ScreenGui name].PlayerName.Text = player.Name
You should try:
game.Players.PlayerAdded:Connect(function(plr) wait(1) game.StarterGui.StarterGui.PlayerName.Text = game.Players.LocalPlayer.Name end)
Else you should add a waitforchild function at the startergui
Put the localscript inside the text
local player = game.Players.LocalPlayer local text = script.parent text.text = player.name