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
Hi! Your issue is using StarterGui. Your fixed script is here:
game.Players.PlayerAdded:connect(function(player) for i,v in pairs(game.Players:GetChildren()) do local hint= v.PlayerGui.PlayerAdded.Hint hint.Text= player.Name.." has joined the game." wait(3) hint.Text= nil end end) game.Players.PlayerRemoving:connect(function(player) for a,b in pairs(game.Players:GetChildren()) do local hint=b.PlayerGui.PlayerAdded.Hint hint.Text=player.Name.." has left the game." wait(3) hint.Text=nil end end)