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

How to move TextLabel from Previously created TextLabel?

Asked by
KenUSM 53
6 years ago

How do I make TextLabel move from the previous Textlabel Position, every time a new TextLabel is made.

script so far

script.Parent.ViewScore.MouseButton1Click:connect(function()
    local Student = Instance.new("TextLabel")
    Student.Name = "Student"
    Student.Parent = ScrollingFrame
    Student.Font = "SourceSansLight"
    Student.TextScaled = true
    Student.Size = UDim2.new(1,0,0,55)
    Student.Position = Student.Position + UDim2.new(0,0,0,65)
    if Student.Position == UDim2(0,0,0,65) then 
        Student.Position = Student.Position + UDim2.new(0,0,0,55)
    end
    Student.Text = PlayerName.Value .."     " .. Score.Value .."%"
end)

It would create the TextLabel to the new Position but it doesn't add from the previous ones and I don't want to keep using If Functions to make it move because I'm trying to make it when someone clicks on the Button their name will appear in a SurfaceGui and it keeps doing this for every player but it shows everyone's name, not just 1 persons.

0
Use a UIGridLayout. They are super useful. hiimgoodpack 2009 — 6y
0
Thank You. KenUSM 53 — 6y

Answer this question