generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Text on Chatted

Previous Thread :: Next Thread 
iLordOfAviation is not online. iLordOfAviation
Joined: 23 Mar 2012
Total Posts: 1325
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 is not online. 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
iLordOfAviation is not online. iLordOfAviation
Joined: 23 Mar 2012
Total Posts: 1325
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image