Player chatted function not working??
1 | player.Chatted:connect( function (msg) |
for some reason, this isn't working
but i'm sure there's nothing wrong there so i suspect its in the NewChat function.
01 | function NewChat(player, msg) |
02 | local ChatFrame = Instance.new( "TextLabel" , script.CHATGUI.ChatGUI) |
03 | ChatFrame.Size = UDim 2. new( 0.8 , 0 , 0.1 , 0 ) |
04 | ChatFrame.Position = UDim 2. new(- 1 , 0 , 0.8 , 0 ) |
05 | ChatFrame.TextXAlignment = "Left" |
06 | ChatFrame.TextColor 3 = Color 3. new( 1 , 1 , 1 ) |
07 | ChatFrame.TextStrokeColor 3 = Color 3. new( 0 , 0 , 0 ) |
08 | ChatFrame.TextStrokeTransparency = 0 |
09 | ChatFrame.BackgroundTransparency = 1 |
10 | ChatFrame.FontSize = "Size18" |
11 | ChatFrame.TextColor 3 = Color 3. new( 1 , 1 , 1 ) |
12 | ChatFrame.TextStrokeColor 3 = Color 3. new( 0 , 0 , 0 ) |
13 | ChatFrame.Font = "ArialBold" |
14 | ChatFrame.Text = player.Name.. ": " ..msg |
and here's the UpdateChat function just in case i was too stupid to find out a mistake here
02 | if #script.CHATGUI.ChatGUI:GetChildren() > 0 then |
03 | for i,v in pairs (script.CHATGUI.ChatGUI:GetChildren()) do |
04 | v.Position = v.Position + UDim 2. new( 0 , 0 , - 0.1 , 0 ) |
05 | if v.Position.X.Scale = = - 1 then |
06 | v.Position = v.Position + UDim 2. new( 1.01 , 0 , 0 , 0 ) |
08 | if v.Position.Y.Scale < - 0.01 then |
14 | if #script.CHATGUI.ChatGUI:GetChildren() > 0 then |
15 | for i,v in pairs (script.CHATGUI.ChatGUI:GetChildren()) do |
16 | v.Position = v.Position + UDim 2. new( 0 , 0 , - 0.1 , 0 ) |
17 | if v.Position.X.Scale = = - 1 then |
18 | v.Position = v.Position + UDim 2. new( 1.01 , 0 , 0 , 0 ) |
20 | if v.Position.Y.Scale < - 0.01 then |
Help would be appreciated :D