johnhugh
|
  |
| Joined: 26 Mar 2009 |
| Total Posts: 1971 |
|
|
| 14 Aug 2013 11:07 PM |
Chatted ( Instance head, String message, ChatColor chatColor ) What does "Instance head" mean?
And how do I get that argument returned to me?
I have never messed with chat, so I have no idea what to do qq
Basically What I am trying to do: game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) --Custom Dialogue Chat bubble end) end) |
|
|
| Report Abuse |
|
|
johnhugh
|
  |
| Joined: 26 Mar 2009 |
| Total Posts: 1971 |
|
| |
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 14 Aug 2013 11:29 PM |
Don't use the Chatted *event*. Instead: http://wiki.roblox.com/index.php/Chat_(Method) (the first one) i.e.
game:GetService("Chat"):Chat(player.Character,messagegoeshere,"Blue")
If I remember right. If I don't, someone correct me.
~ Oh, I'm sorry, did I break your concentration? ~ |
|
|
| Report Abuse |
|
|
johnhugh
|
  |
| Joined: 26 Mar 2009 |
| Total Posts: 1971 |
|
|
| 14 Aug 2013 11:38 PM |
When I used
Chat(player.Character.Head, msg, "Blue" ) I expected it to give me dialogue. When I used dialogue it doesn't display a message, it just shows the ? ! or $ in whatever colors |
|
|
| Report Abuse |
|
|
johnhugh
|
  |
| Joined: 26 Mar 2009 |
| Total Posts: 1971 |
|
|
| 14 Aug 2013 11:43 PM |
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if tostring(player.TeamColor) == "Really Blue" then Chat(player.Character.Head, msg, "Blue" ) elseif tostring(player.TeamColor) == "Really Red" then Chat(player.Character.Head, msg, "Red" ) elseif tostring(player.TeamColor) == "Lime Green" then Chat(player.Character.Head, msg, "Green" ) end end) end) Doesn't do anything qq |
|
|
| Report Abuse |
|
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 14 Aug 2013 11:46 PM |
Did you read what I posted...? Put this exact thing before each Chat() line:
game:GetService("Chat"):
Kay?
~ Oh, I'm sorry, did I break your concentration? ~ |
|
|
| Report Abuse |
|
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 14 Aug 2013 11:53 PM |
| Why are you just calling a random Chat function? Unless you have made a custom Chat function, which I doubt you have. |
|
|
| Report Abuse |
|
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 15 Aug 2013 12:34 AM |
@Zach See my previous post for clarity.
~ Oh, I'm sorry, did I break your concentration? ~ |
|
|
| Report Abuse |
|
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 15 Aug 2013 12:40 AM |
| I was already aware of your post when I made my post. |
|
|
| Report Abuse |
|
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 15 Aug 2013 12:40 AM |
So w- Nevermind.
~ Oh, I'm sorry, did I break your concentration? ~ |
|
|
| Report Abuse |
|
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 15 Aug 2013 12:46 AM |
| I'm assuming you were going to ask why I would post that if I had already seen your post? Well, it was simply a question to the OP. I knew he was meaning to call the Chat() method on the Chat service. I suppose I should have asked if the OP thought Chat() was a shared function such as, Instance.new. |
|
|
| Report Abuse |
|
|
johnhugh
|
  |
| Joined: 26 Mar 2009 |
| Total Posts: 1971 |
|
|
| 15 Aug 2013 10:23 AM |
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if tostring(player.TeamColor) == "Really Blue" then game:GetService("Chat") Chat(player.Character.Head, msg, "Blue" ) elseif tostring(player.TeamColor) == "Really Red" then game:GetService("Chat") Chat(player.Character.Head, msg, "Red" ) elseif tostring(player.TeamColor) == "Lime Green" then game:GetService("Chat") Chat(player.Character.Head, msg, "Green" ) end end) end) Doesn't work? What am I doing wrong? D: Chat is a method, but what would I put it on? (player:Chat()?) or does game:GetService("Chat") take care of that? |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 15 Aug 2013 10:29 AM |
Chat is never defined as a function, and your use of GetService is very inefficient. Define chat at the top of your code with a call to game:GetService("Chat"). Then, to use the Chat method in it, use `chat:Chat( partOrCharacter, msg, chatColor )` |
|
|
| Report Abuse |
|
|
johnhugh
|
  |
| Joined: 26 Mar 2009 |
| Total Posts: 1971 |
|
|
| 15 Aug 2013 10:32 AM |
So you want me to write game:GetService("Chat") at the top and then replace all my chat functions with: chat:Chat(stuff) ?
I don't understand how it works o.e If I am using "chat:Chat(stuff) " then what is "chat"? Was it defined as a variable? I don't see where D: |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 15 Aug 2013 10:41 AM |
The Chat service should be stored in a variable. The variable name should be something like "chat" or "chatService" to identify the value pointed to by the variable, but it can be something like "cookies" or "alienRaceSentToDestroyAllHumanTrace". The value that the variable has to point to is the Chat service, which can be gotten using game:GetService("Chat"). After storing the chat service in your variable, you can use all of the methods, properties and events of the chat service by using the variable.
So:
local chat = game:GetService("Chat");
...
chat:Chat( part, "message", ChatColor ) |
|
|
| Report Abuse |
|
|
johnhugh
|
  |
| Joined: 26 Mar 2009 |
| Total Posts: 1971 |
|
|
| 15 Aug 2013 10:46 AM |
local chat = game:GetService("Chat") game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if tostring(player.TeamColor) == "Really Blue" then chat:Chat(player.Character.Head, msg, "Blue" ) elseif tostring(player.TeamColor) == "Really Red" then chat:Chat(player.Character.Head, msg, "Red" ) elseif tostring(player.TeamColor) == "Lime Green" then chat:Chat(player.Character.Head, msg, "Green" ) end end) end)
It, still, doesn't work :/ What am I doing wrong? :Chat is meant to give you dialogue text bubbles, correct? |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 15 Aug 2013 10:49 AM |
| I suggest using TeamColor.Name instead of tostring(TeamColor). Also, make sure that the names of the BrickColors are capitalized properly. |
|
|
| Report Abuse |
|
|
johnhugh
|
  |
| Joined: 26 Mar 2009 |
| Total Posts: 1971 |
|
|
| 15 Aug 2013 10:53 AM |
It was that darn Case Sensitivity >:0 Anyways, Thanks Also: How can I get rid of the default chat bubbles? I'm planning on making a chat GUI, because classic chat get's in the way of my other GUIs, so I want both bubble AND classic gone. Classic can be rid of by setting it on bubble, and I figure it is possible to disab;e/delete bubble chats somehow :0 |
|
|
| Report Abuse |
|
|
johnhugh
|
  |
| Joined: 26 Mar 2009 |
| Total Posts: 1971 |
|
|
| 15 Aug 2013 11:09 AM |
| Any way to get rid of chat bubbles with a script? e.e |
|
|
| Report Abuse |
|
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 15 Aug 2013 03:27 PM |
| Configure > Permissions > ChatType > Classic |
|
|
| Report Abuse |
|
|