player.Chatted:connect(function(msg) UpdateChat() NewChat(player, msg) end)
for some reason, this isn't working but i'm sure there's nothing wrong there so i suspect its in the NewChat function.
function NewChat(player, msg) local ChatFrame = Instance.new("TextLabel", script.CHATGUI.ChatGUI) ChatFrame.Size = UDim2.new(0.8, 0, 0.1, 0) ChatFrame.Position = UDim2.new(-1, 0, 0.8, 0) ChatFrame.TextXAlignment = "Left" ChatFrame.TextColor3 = Color3.new(1, 1, 1) ChatFrame.TextStrokeColor3 = Color3.new(0, 0, 0) ChatFrame.TextStrokeTransparency = 0 ChatFrame.BackgroundTransparency = 1 ChatFrame.FontSize = "Size18" ChatFrame.TextColor3 = Color3.new(1, 1, 1) ChatFrame.TextStrokeColor3 = Color3.new(0, 0, 0) ChatFrame.Font = "ArialBold" ChatFrame.Text = player.Name..": "..msg
and here's the UpdateChat function just in case i was too stupid to find out a mistake here
function UpdateChat() if #script.CHATGUI.ChatGUI:GetChildren() > 0 then for i,v in pairs(script.CHATGUI.ChatGUI:GetChildren()) do v.Position = v.Position + UDim2.new(0, 0, -0.1, 0) if v.Position.X.Scale == -1 then v.Position = v.Position + UDim2.new(1.01, 0, 0, 0) end if v.Position.Y.Scale < -0.01 then v:Destroy() end end end end if #script.CHATGUI.ChatGUI:GetChildren() > 0 then for i,v in pairs(script.CHATGUI.ChatGUI:GetChildren()) do v.Position = v.Position + UDim2.new(0, 0, -0.1, 0) if v.Position.X.Scale == -1 then v.Position = v.Position + UDim2.new(1.01, 0, 0, 0) end if v.Position.Y.Scale < -0.01 then v:Destroy() end end end
Help would be appreciated :D