|
| 30 Dec 2012 11:14 AM |
I don't have any experience with onChatted functions and when I earlier asked someone to help I got this, which doesn't work:
A = script.Parent.A B = script.Parent.B C = script.Parent.C D = script.Parent.D E = script.Parent.E F = script.Parent.F G = script.Parent.G H = script.Parent.H I = script.Parent.I J = script.Parent.J
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) J.Text = I.Text I.Text = H.Text H.Text = G.Text G.Text = F.Text F.Text = E.Text E.Text = D.Text D.Text = C.Text C.Text = B.Text B.Text = A.Text A.Text = player.Name .. ": " .. msg end) end)
Help please? |
|
|
| Report Abuse |
|
|
Usering
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 10281 |
|
|
| 30 Dec 2012 12:05 PM |
What's 'onChatted?'
~ Secrets Shall Lead Us To The End ~ |
|
|
| Report Abuse |
|
|
|
| 30 Dec 2012 12:29 PM |
| Oh wait it's just Chatted, I just said that I have never tried chat functions myself so don't expect me to say everything right. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
| |
|
|
| 31 Dec 2012 06:08 AM |
| It just shows the chat of the person who joined last |
|
|
| Report Abuse |
|
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 31 Dec 2012 06:10 AM |
| The script is correct...and if you want to make it different then add/edit things. You are unclear. |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2012 06:12 AM |
| The script is correct if you wanted a chat that only shows the chat of a person that joined after you. I want it to show everyone's chat. |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2012 06:14 AM |
| If it does not work you may have missed something in the Gui |
|
|
| Report Abuse |
|
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 31 Dec 2012 06:14 AM |
Just add more Guis and then place the player's poop in there. And please mention that in your first post... |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2012 06:17 AM |
| Duplicating the chat GUI fixes it? I'm 100% sure that's not working rofl |
|
|
| Report Abuse |
|
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 31 Dec 2012 06:17 AM |
| rofl im so sore dat yo naw listning |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2012 06:21 AM |
| Do you even know what's the point of chat? |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2012 06:24 AM |
| I can try to find a way to fix the problem |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2012 06:27 AM |
| It probably needs some kind of a loop to find all players |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2012 06:45 AM |
lolnope. No loop.
game.Players.PlayerAdded:connect(function(plyr) plyr.Chatted:connect(function(msg) print(plyr.Name..": "..msg) end end
If I said Hi! It would print:
TheAwesomenessDude: Hi!
|
|
|
| Report Abuse |
|
|
|
| 31 Dec 2012 06:46 AM |
Forgot the brackets after the ends. Last two lines should be:
end) end) |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2012 07:06 AM |
Script in workspace:
root = game.Lighting.Chat A = root.A B = root.B C = root.C D = root.D E = root.E F = root.F G = root.G H = root.H I = root.I J = root.J
for i,player in ipairs(game.Players:GetPlayers()) do player.Chatted:connect(function(msg) J.Value = I.Value I.Value = H.Value H.Value = G.Value G.Value = F.Value F.Value = E.Value E.Value = D.Value D.Value = C.Value C.Value = B.Value B.Value = A.Value A.Value = player.Name .. ": " .. msg end) end
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) J.Text = I.Text I.Text = H.Text H.Text = G.Text G.Text = F.Text F.Text = E.Text E.Text = D.Text D.Text = C.Text C.Text = B.Text B.Text = A.Text A.Text = player.Name .. ": " .. msg end) end)
Script in PlayerGui:
root = game.Lighting.Chat
for i,v in ipairs(root:GetChildren()) do script.Parent[v.Name].Text = v.Value end for i,v in ipairs(root:GetChildren()) do v.Changed:connect(function() script.Parent[v.Name].Text = v.Value end) end
In Lighting:
game.Lighting --> Chat --> Chats (A, B, C ect...)
|
|
|
| Report Abuse |
|
|
|
| 31 Dec 2012 07:10 AM |
| also the Chats (A, B, C ect...) in Lighting have to be a StringValue |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2012 07:20 AM |
| How do you always make the scripts so complicated lol? |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2012 07:23 AM |
| I did so the scripts use Lighting to get the chat so every one have same text at the screen, for me it is easy to understand it |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2012 07:25 AM |
| remember that it is two scripts not one |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2012 07:30 AM |
| I've done some complicated scripts too and the game I'm putting the chat GUI into has a lot of those but I'm sure there's a way to make the chat GUI work without multiple scripts. |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2012 07:31 AM |
ops, I forgot something in the first script
root = game.Lighting.Chat A = root.A B = root.B C = root.C D = root.D E = root.E F = root.F G = root.G H = root.H I = root.I J = root.J
for i,player in ipairs(game.Players:GetPlayers()) do player.Chatted:connect(function(msg) J.Value = I.Value I.Value = H.Value H.Value = G.Value G.Value = F.Value F.Value = E.Value E.Value = D.Value D.Value = C.Value C.Value = B.Value B.Value = A.Value A.Value = player.Name .. ": " .. msg end) end
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) J.Value = I.Value I.Value = H.Value H.Value = G.Value G.Value = F.Value F.Value = E.Value E.Value = D.Value D.Value = C.Value C.Value = B.Value B.Value = A.Value A.Value = player.Name .. ": " .. msg end) end)
this one is correct |
|
|
| Report Abuse |
|
|