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 » Scripting Helpers
Home Search
 

Trying to make players chat equal to GUI text?

Previous Thread :: Next Thread 
lucas301 is not online. lucas301
Joined: 28 Dec 2008
Total Posts: 1307
12 Mar 2013 12:47 PM
function Player(input) --Calls the Player method and has a string in the parenthesis.
if input ~= nil then --If the users chatted message doesn't equal nothing then
script.Parent.Text = (input.Name + input) --Gets users name and input in GUI
end

end
game.Players.LocalPlayer.Chatted:connect(Player) --Method created.

It's not working ;-;?!?!?!?!
Report Abuse
lucas301 is not online. lucas301
Joined: 28 Dec 2008
Total Posts: 1307
12 Mar 2013 12:48 PM
Oh yeah, plus it doesn't show any error messages either.
Report Abuse
lucas301 is not online. lucas301
Joined: 28 Dec 2008
Total Posts: 1307
12 Mar 2013 12:51 PM
Argh, found a few mistakes, here's fixed but still not working:

player = game.Players.LocalPlayer
function Player(input)
if input ~= nil then
script.Parent.Text = (player.Name + input)
end

end
game.Players.LocalPlayer.Chatted:connect(Player)
Report Abuse
einsteinK is not online. einsteinK
Joined: 22 May 2011
Total Posts: 1015
12 Mar 2013 12:52 PM
it's input..player.Name or player.Name..input
(string1 .. string2)
Report Abuse
lucas301 is not online. lucas301
Joined: 28 Dec 2008
Total Posts: 1307
12 Mar 2013 12:57 PM
Oh yeah! I've been learning Java lately, and now they're being intercepted with Lua >.<
Report Abuse
lucas301 is not online. lucas301
Joined: 28 Dec 2008
Total Posts: 1307
12 Mar 2013 12:58 PM
Thanks!
Report Abuse
lucas301 is not online. lucas301
Joined: 28 Dec 2008
Total Posts: 1307
12 Mar 2013 01:00 PM
Argh.. still not working :(? And it's showing no error either: (edited)

local localplayer = game.Players.LocalPlayer
function Player(input)
if input ~= nil then
script.Parent.Text = (localplayer.Name .. input.Chatted)
end

end
game.Players.LocalPlayer.Chatted:connect(Player)
Report Abuse
einsteinK is not online. einsteinK
Joined: 22 May 2011
Total Posts: 1015
12 Mar 2013 01:01 PM
input IS the chatted message, no Java events here
Report Abuse
lucas301 is not online. lucas301
Joined: 28 Dec 2008
Total Posts: 1307
12 Mar 2013 01:04 PM
I meant that I'm learning Java, and I'm getting mixed up with Lua >.<..
Report Abuse
lucas301 is not online. lucas301
Joined: 28 Dec 2008
Total Posts: 1307
12 Mar 2013 01:05 PM
Like in print, Java uses + to put them all together, but in Lua it uses ..
Report Abuse
lucas301 is not online. lucas301
Joined: 28 Dec 2008
Total Posts: 1307
12 Mar 2013 01:42 PM
Bump
Report Abuse
einsteinK is not online. einsteinK
Joined: 22 May 2011
Total Posts: 1015
12 Mar 2013 01:48 PM

local player = game.Players.LocalPlayer

function Player(input)
if input ~= nil then
script.Parent.Text = player.Name .. input
end
end

player.Chatted:connect(Player)
Report Abuse
lucas301 is not online. lucas301
Joined: 28 Dec 2008
Total Posts: 1307
12 Mar 2013 01:54 PM
Crap, I forgot to remove Chatted from my previous attempted script >.< thanks
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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