Anyone is willing to help with this script
game.Players.PlayerAdded:Connect(function(plr) -- When players joins local textlabel = game.Workspace.Leaderboard.SurfaceGui.TextLabel -- Find the textLabel local getchildren = textlabel:GetChildren() -- Get all the textLabel if getchildren then textlabel.Text = plr.Name -- Textlabel = player name textlabel.Name = plr.Name -- Change the name of the textlabel to the player name end end)
game.Players.PlayerRemoving:Connect(function(plr) local textlabel = game.Workspace.Leaderboard.SurfaceGui:FindFirstChild(plr.Name) local textlabelname = game.Workspace.Leaderboard.SurfaceGui.TextLabel.Text local textd = textlabelname wait (0.5) textlabel.Text = textlabelname end)
Basically I have put 9 textlabel on to the surface gui then when the players leave the game then their name is still there. Anyone can help me with this?