Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What's wrong with my script? I don't get it?

I am trying to make a script that displays the player's name inside of a TextLabel when they enter the game, and remove it after 5 seconds.

game.Players.PlayerAdded:connect(function(player)
game.StarterGui.ScreenGui.TextLabel.Text = player.Name
wait(5)
game.StarterGui.ScreenGui.TextLabel.Text = " "
end)

All of the code above works, except for line 4:

game.StarterGui.ScreenGui.TextLabel.Text = " "

The point is to basically replace the text in the TextLabel with the players name, and then make the text disappear by just adding a space for where you would insert text. Can anyone help?

1 answer

I suggest trying to set the Value to "" because from what I understand from your question it sets the name successfully then does not set it to blank after 5 seconds. If this is the case I would assume it is some weird issue with setting the text to just "", however this is just my quick observation and I did not test any of this.

This discussion is preserved as it was. New answers, comments, and votes are closed.