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

How Do I Make The Players' Name Colors Random On A Custom Chat GUI?

Asked by 11 years ago

I'm making a chat GUI similar to the old one, and I'm trying to figure out how to make it so the people have similar colors like on the normal chat GUI. This is what I got so far.

01function UpdateOldLabels(Parent)
02    for i,v in pairs(Parent:GetChildren()) do
03        if v.Name:sub(1,4):lower() == "line" then
04            local LineNumber = v.Name:sub(5)
05            if LineNumber == "6" then
06                v:destroy()
07            else
08                v.Name = "line"..tostring(tonumber(LineNumber) + 1)
09                v.Position = v.Position - UDim2.new(0,0,0,15)
10            end
11        end
12    end
13end
14 
15game:getService("Players").PlayerAdded:connect(function(player)
View all 37 lines...

1 answer

Log in to vote
0
Answered by
MixCorp 70
11 years ago
01function UpdateOldLabels(Parent)
02    for i,v in pairs(Parent:GetChildren()) do
03        if v.Name:sub(1,4):lower() == "line" then
04            local LineNumber = v.Name:sub(5)
05            if LineNumber == "6" then
06                v:destroy()
07            else
08                v.Name = "line"..tostring(tonumber(LineNumber) + 1)
09                v.Position = v.Position - UDim2.new(0,0,0,15)
10            end
11        end
12    end
13end
14game:getService("Players").PlayerAdded:connect(function(player)
15    player.Chatted:connect(function(msg)
View all 36 lines...
0
That just broke the GUI. DapperLink123 30 — 11y
0
Sorry, Did it wrong. Lemme repost. MixCorp 70 — 11y
0
There, Look at the new edit and try that. MixCorp 70 — 11y
Ad

Answer this question