I got this Code from Wiki, And I changed it to the way I want it, like Fade, Tweening, and Colors, but I don't want ROBLOX's Default Chat Bar, I wanna make my own, But it won't respond back, here is the code :
local Teams = script.Teams
local t1 = Teams.Team1
local t2 = Teams.Team2
wait(.1)
function UpdateOldLabels(Parent)
for i,v in pairs(Parent:GetChildren()) do
if v.Name:sub(1,4):lower() == "line" then
local LineNumber = v.Name:sub(5)
if LineNumber == "12" then
v:Destroy()
else
v.Name = "line"..tostring(tonumber(LineNumber) + 1)
v.Position = v.Position - UDim2.new(0,0,0,20)
end
end
end
end
print'l11'
game:GetService("Players").PlayerAdded:connect(function(player)
for _,v in ipairs(game:GetService("Players"):GetChildren()) do
v.PlayerGui.Chat.TextBox.FocusLost:connect(function()
UpdateOldLabels(v:WaitForChild("PlayerGui").Chat.chatframe)
print'lol'
newchatline = Instance.new("TextLabel",v:WaitForChild("PlayerGui").Chat.chatframe)
newchatline.Text = player.Name.. ": " ..v:WaitForChild("PlayerGui").Chat.TextBox.Text
newchatline.Size = UDim2.new(1,0,0,20)
newchatline.Position = UDim2.new(0,0,1,-1)
newchatline.Font = "SourceSansBold"
newchatline.TextColor3 = Color3.new(255,255,255)
newchatline.TextStrokeTransparency = 0
newchatline.BackgroundTransparency = 1
newchatline.TextTransparency = 1
newchatline.BorderSizePixel = 0
newchatline.FontSize = "Size18"
newchatline.TextXAlignment = "Left"
newchatline.TextYAlignment = "Top"
newchatline.ClipsDescendants = true
newchatline.Name = "line1"
end)
UpdateOldLabels(game:GetService("StarterGui").Chat.chatframe)
newchatline:Clone().Parent = game:GetService("StarterGui").Chat.chatframe
for _,plr in next, game.Players:GetChildren() do
if plr.TeamColor == t1.Value then
newchatline.TextStrokeColor3 = t1.Value.Color
for i = 1,0,-.1 do
wait()
newchatline.TextTransparency = i
newchatline:TweenPosition(UDim2.new(0,0,1,-15),"Out", "Quad", .1, true)
end
end
end
end
end)
