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: Not good at this...

Previous Thread :: Next Thread 
SuperSonic1350 is not online. SuperSonic1350
Joined: 27 Sep 2011
Total Posts: 935
17 May 2014 01:57 PM
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(chat)
if string.sub(chat, 1, 4) == "msg/" and
if player.Name = {"SuperSonic1350","SuperSonic1350Alt","ILoveTrainSim2006"} then
addMessage(player.Name, string.sub(chat, 5))
end
end)
end)

Its suppposed to detect if me, or my other alts had said "msg/".
The problem is it doesnt work if i try "and".
Report Abuse
SuperSonic1350 is not online. SuperSonic1350
Joined: 27 Sep 2011
Total Posts: 935
17 May 2014 01:58 PM
Tired, so explanation is not good :\
Report Abuse
youssef04 is not online. youssef04
Joined: 22 Jan 2011
Total Posts: 1745
17 May 2014 01:59 PM
if player.Name = "SuperSonic1350" or "SuperSonic1350Alt" or "ILoveTrainSim2006" then
Report Abuse
SuperSonic1350 is not online. SuperSonic1350
Joined: 27 Sep 2011
Total Posts: 935
17 May 2014 02:00 PM
@youssef
Tried that already and red underline
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
17 May 2014 02:01 PM
local youAndYourOtherAlternateAccounts = {SuperSonic1350 = true, SuperSonic1350Alt = true, ILoveTrainSim2006 = true};
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(chat)
if string.sub(chat, 1, 4) == "msg/" and
if youAndYourOtherAlternateAccounts[player.Name] then
addMessage(player.Name, string.sub(chat, 5))
end
end
end)
end)
Report Abuse
SuperSonic1350 is not online. SuperSonic1350
Joined: 27 Sep 2011
Total Posts: 935
17 May 2014 02:02 PM
still red underline
Report Abuse
SuperSonic1350 is not online. SuperSonic1350
Joined: 27 Sep 2011
Total Posts: 935
17 May 2014 02:07 PM
b-1
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
17 May 2014 02:08 PM
what line is the red underline on?
Report Abuse
SuperSonic1350 is not online. SuperSonic1350
Joined: 27 Sep 2011
Total Posts: 935
17 May 2014 02:08 PM
if youAndYourOtherAlternateAccounts[player.Name] then
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
17 May 2014 02:13 PM
if string.sub(chat, 1, 4) == "msg/" then
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