How can I put a players recent saying in a gui? [Sync List Chat Log]
I want to make a GUI that shows the text of recent player's sayings. So far I have this but it doesn't seem to work I might be doing something wrong but im not sure. How would I get the players recent sayings and put it in a GUI? [SCRIPT]
01 | MainPlayer = game.Players.SavageMunkey |
06 | if logs [ i ] = = logs [ name ] then |
07 | log = log..table.concat(logs [ name ] ) |
14 | function getLogz(m, plr) |
15 | if m:sub( 1 , 8 ) = = "getlogs;" then |
16 | plr = game.Players [ m:sub( 9 ) ] |
17 | local SG = Instance.new( "ScreenGui" ,plr.PlayerGui) |
18 | local SGF = Instance.new( "Frame" ,SG) |
19 | local SGTB = Instance.new( "TextButton" ) |
20 | SGTB.Size = UDim 2. new( 0 , 500 , 0 , 500 ) |
21 | SGTB.Position = UDim 2. new(. 5 , 0 ,. 5 , 0 ) |
22 | SGTB.Text = _G.GetLogs(plr) |
23 | SGTB.MouseButton 1 Down:connect( function () |
27 | table.insert(logs(plr.Name)) |
29 | MainPlayer.Chatted:connect(getLogz) |