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
 

Re: Chat Phail

Previous Thread :: Next Thread 
ClubPenguinFan101 is not online. ClubPenguinFan101
Joined: 16 Jan 2009
Total Posts: 85
03 Mar 2011 03:09 PM
I've been trying to make some chat commands. I cant seem to do it! I have the chat and the commands but the problem is the connection. How do you make it so any player can say something and then something happens? Just start me a chat script, thats all Im asking for.
Report Abuse
AeroMcFly is not online. AeroMcFly
Joined: 16 Jul 2008
Total Posts: 546
03 Mar 2011 03:11 PM
game.Players.PlayerAdded:connect(p)
p.Chatted:connect(function(msg)

end)
end)
Report Abuse
scripterzack is not online. scripterzack
Joined: 22 Jan 2011
Total Posts: 562
03 Mar 2011 03:28 PM
PLAYER.Chatted:connect(FUNCTION)
will return (string message, Instance recipient)
Report Abuse
ClubPenguinFan101 is not online. ClubPenguinFan101
Joined: 16 Jan 2009
Total Posts: 85
03 Mar 2011 04:11 PM
But how do you get the player...?
Report Abuse
bagwan12345 is not online. bagwan12345
Joined: 17 Dec 2009
Total Posts: 1498
03 Mar 2011 04:15 PM
You use the PlayerAdded event's argument and sort of convert it into the Chatted event's connection
Report Abuse
ClubPenguinFan101 is not online. ClubPenguinFan101
Joined: 16 Jan 2009
Total Posts: 85
03 Mar 2011 04:17 PM
UMG SO ADVANCED! I think I'll just get a chat script off free models and delete everything except connection line and functions and make it into what I want. :l Thanks for trying to help though. FREE COOKIES! *starts raining cookies*
Report Abuse
Swordphin123 is not online. Swordphin123
Joined: 09 Apr 2008
Total Posts: 5234
03 Mar 2011 04:18 PM
Its not that advanced actually, it runs this "PlayerAdded" connection function aka "role" and runs that current line when a new player joins the server.
Report Abuse
TheNewScripter is not online. TheNewScripter
Joined: 02 Mar 2010
Total Posts: 2432
03 Mar 2011 04:22 PM
function onChatted(msg,speaker)
if msg=="reset" then
if speaker.Character~=nil then
speaker.Character:BreakJoints()
end
end
end

function Connect(player)
player.Chatted:connect(function(msg) onChatted(msg,player)
end

function onPlayerEntered(user)
Connect(user)
end

game.Players.PlayerAdded:connect(onPlayerEntered)


Send me a PM about what you dont get or make a post.
Report Abuse
ClubPenguinFan101 is not online. ClubPenguinFan101
Joined: 16 Jan 2009
Total Posts: 85
03 Mar 2011 04:25 PM
Yes. It was a joke with the advanced thing. But I found something to start a chat script in the wiki, woot. Here it is:

function onChatted(player, message)
print(player .. " said " .. message)
end

function onPlayerAdded(player)
player.Chatted:connect(function(message, recipient) onChatted(player, message) end)
end

game.Players.PlayerAdded:connect(onPlayerAdded)
Report Abuse
AeroMcFly is not online. AeroMcFly
Joined: 16 Jul 2008
Total Posts: 546
03 Mar 2011 04:48 PM
Mine was the simplist..
Report Abuse
ClubPenguinFan101 is not online. ClubPenguinFan101
Joined: 16 Jan 2009
Total Posts: 85
07 Sep 2011 07:09 PM
Fine, have a cookie.
Report Abuse
JonathanSwag is not online. JonathanSwag
Joined: 30 Aug 2011
Total Posts: 1012
07 Sep 2011 07:14 PM
I:
Report Abuse
bagwan12345 is not online. bagwan12345
Joined: 17 Dec 2009
Total Posts: 1498
08 Sep 2011 03:52 PM
Heheh

Can u give me a caik???
Report Abuse
Cachinnation is not online. Cachinnation
Joined: 21 Aug 2011
Total Posts: 1797
08 Sep 2011 03:54 PM
Why.. did you bump this?
Report Abuse
bagwan12345 is not online. bagwan12345
Joined: 17 Dec 2009
Total Posts: 1498
11 Sep 2011 09:39 AM
Weird right?
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