Okay so i have this, custom ingame leaderboard.
Everytime i player joins it creates a textlabel, but i want the textlabel to move
{0, 0},{0.05, 0}
each time a new one comes, so it isnt overlayed
CODE
game.Players.PlayerAdded:connect(function(player) local label = Instance.new("TextLabel",script.Parent.SurfaceGui.Frame) label.BorderSizePixel = 0 label.BackgroundTransparency = 1 label.Size = UDim2.new(1, 0, .05, 0) label.Font = "ArialBold" label.FontSize = "Size36" label.TextColor3 = BrickColor.White().Color label.TextStrokeTransparency = 0.5 label.Text = player.Name.." - "..player.userId end)
Well, I see no attempt of you trying to push its position down. What you need to do is set a variable, that would contain the last TextLabel, or its position. So:
LastLabel = nil game.Players.PlayerAdded:connect(function(player) local label = Instance.new("TextLabel",script.Parent.SurfaceGui.Frame) label.BorderSizePixel = 0 label.BackgroundTransparency = 1 label.Size = UDim2.new(1, 0, .05, 0) label.Font = "ArialBold" label.FontSize = "Size36" label.TextColor3 = BrickColor.White().Color label.TextStrokeTransparency = 0.5 label.Text = player.Name.." - "..player.userId if LastLabel ~= nil then label.Position = LastLabel.Position + UDim2.new(0, 0, .05, 0) end LastLabel = label end) game.Players.PlayerRemoving:connect(function(player) if script.Parent.SurfaceGui.Frame:findFirstChild(player.Name.." - "..player.userId) then script.Parent.SurfaceGui.Frame['player.Name.." - "..player.userId']:Destroy() end end)