Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 10 years ago

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

Log in to vote
0
Answered by
25564 200 Moderation Voter
10 years ago

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.

Ad

Answer this question