|
| 20 Jul 2016 06:52 PM |
function onChatted(msg, recipient, speaker) local source = string.lower(speaker.Name) msg = string.lower(msg) local pos1 = script.Parent.Position local pos2 = speaker.Character.Head.Position dist=(pos1-pos2).magnitude dist=dist-math.max(math.max(speaker.Character.Head.Size.x, speaker.Character.Head.Size.z), speaker.Character.Head.Size.y) if (dist <=5 and script.Parent.On.Value == true) then script.Parent.Parent.Parent.Board.SurfaceGui.TextLabel.Text = msg end end
function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) end
game.Players.ChildAdded:connect(onPlayerEntered)
This script works to show what a person near a microphone said on a little TV, but it just turns capital letters into lower-case, can anyone please help me either make the script keep capitals where they should be, or rescript this to work? Thanks.
|
|
|
| Report Abuse |
|
kools
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 1659 |
|
|
| 20 Jul 2016 06:57 PM |
| Delete the line that says << msg = string.lower(msg) >> |
|
|
| Report Abuse |
|
|
| 20 Jul 2016 07:06 PM |
Thanks! I just stole the script from one of those super old working microphones that use the now completely irrelevant message, and changed it from message to screengui, so I had no idea what I actually needed or not.
|
|
|
| Report Abuse |
|