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

How do i make a textlabel go down on chatted?

Asked by
sad_eyez 162
8 years ago

I don't know if I asked the question right or not, so sorry if I didn't, but I am trying to make a chat gui and I need to know how to make the next persons chat line go down instead of all the lines piling up on top of eachother, this is my first time scripting a chat gui so let me know what I should add or what I should change, I hope this explains it well enough, heres the code I have so far.

Code:

wait(2)
local plr = script.Parent.Parent.Parent
plr.Chatted:connect(function(msg)
    local chat = script.Parent.Chat
    local chatline = Instance.new("TextLabel", chat)
    chatline.Name = "Line"
    chatline.Visible = false
    chatline.BackgroundTransparency = 1
    chatline.Size = UDim2.new(0,175,0,20)
    chatline.TextYAlignment = "Top"
    chatline.TextXAlignment = "Left"
    chatline.ClipsDescendants = true
    chatline.TextColor3 = Color3.new(255,255,255)
    chatline.Text = "["..plr.Name.."] "..msg..""
    chatline.Visible = true
end)
0
You might be better creating the specific amount of TextLabels, and assigning them to a table inside your script, thus allowing you to move messages through them without problems. If you want me to elaborate, I'll make an answer. If not, feel free to reply and I'll do my best to help you. TheArmoredReaper 173 — 8y

Answer this question