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
 

Re: I want a script to detect if ANY player chats...?

Previous Thread :: Next Thread 
R3pix is not online. R3pix
Joined: 07 Jan 2012
Total Posts: 2642
20 Dec 2015 11:44 PM
I need help. Basically, I want to detect if any player chats.
I haven't been able to do this without an error!


Thanks,
R3pix.


Yesterday, tomorrow, new zealand?
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
20 Dec 2015 11:46 PM
game.Players.PlayerAdded:connect(function(plr) --hook up every time a player joins
plr.Chatted:connect(function(msg) --get msg everytime ^^this guy (plr) chats
print(plr.Name .. ' said: ' .. msg) --print msg
end)
end)
Report Abuse
DrHaximus is not online. DrHaximus
Joined: 22 Nov 2011
Total Posts: 8410
20 Dec 2015 11:46 PM
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
-- stuff
end)
end)
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
20 Dec 2015 11:49 PM
game.Players.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(msg)
print(msg)
end
end
Report Abuse
R3pix is not online. R3pix
Joined: 07 Jan 2012
Total Posts: 2642
20 Dec 2015 11:53 PM
No heres the thing, I want it to be a script builder script, or also a script that will run once everybody is ALREADY IN the game. I didn't specify in my Original Post, sorry.


Yesterday, tomorrow, new zealand?
Report Abuse
DrHaximus is not online. DrHaximus
Joined: 22 Nov 2011
Total Posts: 8410
21 Dec 2015 12:04 AM
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
if(msg[1]==':')then loadstring(msg.substr(2,#msg))() end
end)
end)

-- execute strings starting with ':'
-- ex
-- :print("HI")
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
21 Dec 2015 12:09 AM
lol a very bad idea..
Report Abuse
DrHaximus is not online. DrHaximus
Joined: 22 Nov 2011
Total Posts: 8410
21 Dec 2015 12:10 AM
yeup. there's some sandboxing stuff you can do before executing the string, but thats a bit out of the scope of this question
Report Abuse
R3pix is not online. R3pix
Joined: 07 Jan 2012
Total Posts: 2642
21 Dec 2015 12:21 AM
Nonono, I meant a script FOR script builder xd


Yesterday, tomorrow, new zealand?
Report Abuse
DrHaximus is not online. DrHaximus
Joined: 22 Nov 2011
Total Posts: 8410
21 Dec 2015 12:22 AM
i don't see the issue, you can do any script in script builder, why not use ones posted before?

you're not making much sense
Report Abuse
Querq is not online. Querq
Joined: 10 Apr 2013
Total Posts: 486
21 Dec 2015 12:23 AM
for i,v in pairs(game.Players:GetPlayers()) do
v.Chatted:connect(function(msg)
if msg == "hi" then
workspace.Base:Destroy()
end
end)
Report Abuse
IridescentForest is not online. IridescentForest
Joined: 30 Oct 2012
Total Posts: 4304
21 Dec 2015 01:40 AM
@que, that destroys the baseplate when chat
Report Abuse
DrHaximus is not online. DrHaximus
Joined: 22 Nov 2011
Total Posts: 8410
21 Dec 2015 01:46 AM
^
nice reading
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