game.Players.PlayerAdded:connect(function(player)
local hint=game.StarterGui.PlayerAdded.Hint
hint.Text=player.Name.." has joined the game."
wait(3)
hint.Text=nil
end)
game.Players.PlayerRemoving:connect(function(player)
local hint=game.StarterGui.PlayerAdded.Hint
hint.Text=player.Name.." has left the game."
wait(3)
hint.Text=nil
end)
This is a normal script in serverscriptservice. The hint isnt actually a hint it is a textlabel. So the problem is that when the script runs it says the player has joined the game and the text just stays there. And when someone else joins the text should be replaced to the new person who has joined the game but it just stays there

1 comment
You have made the mistake of using StarterGui. https://scriptinghelpers.org/blog/common-mistakes#PlayerGui