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: [HELP] Chat Commands.

Previous Thread :: Next Thread 
SmokedPotato is not online. SmokedPotato
Joined: 12 Apr 2011
Total Posts: 480
10 Apr 2015 10:00 AM
How would I make a door turn semi-transparent when anyone says "Open"
Please explain this to me.
Thanks!
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
10 Apr 2015 10:00 AM
http://wiki.roblox.com/index.php?title=Absolute_beginner%27s_guide_to_scripting
Report Abuse
SmokedPotato is not online. SmokedPotato
Joined: 12 Apr 2011
Total Posts: 480
10 Apr 2015 05:40 PM
You're not funny.
Report Abuse
bojigglesmister2 is not online. bojigglesmister2
Joined: 26 Jun 2011
Total Posts: 1421
10 Apr 2015 05:42 PM
name the door ‘Door” and put this in serverscriptservice






door = workspace.Door


game.Players.PlayerAdded:connect(function(player)

player.Chatted:connect(function(msg, rec)

if string.lower(msg) == “open” then

door.Transparency = .5
wait(1)
door.Transparency = 0


end

end)

end)
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
10 Apr 2015 05:45 PM
@boj, just giving people the answer doesn't help them at all.. in the future you should think about just direct them to a wiki link. Also, why would you want to give them a free answer? They get progress for doing nothing. And you don't have to 'prove yourself' if that's why you gave them the code.

http://wiki.roblox.com/index.php?title=API:Class/Player/Chatted

Report Abuse
SmokedPotato is not online. SmokedPotato
Joined: 12 Apr 2011
Total Posts: 480
10 Apr 2015 05:49 PM
I hate doing things I don't understand.
That's what sets me apart from other people.
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
10 Apr 2015 06:58 PM
That's what sets you apart from becoming a scripter.
Report Abuse
SmokedPotato is not online. SmokedPotato
Joined: 12 Apr 2011
Total Posts: 480
10 Apr 2015 07:03 PM
*Whacks with meter stick*

Out!
Report Abuse
SmokedPotato is not online. SmokedPotato
Joined: 12 Apr 2011
Total Posts: 480
10 Apr 2015 07:04 PM
And I AM a scripter. Just learning something new.
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
10 Apr 2015 07:09 PM
--First you must make a reference to the door.

local door = game.Workspace.Door

--Then you must wait for players to chat

game.Players.PlayerAdded:connect(function(player) -- Player that joined
player.Chatted:connect(function(msg) -- Message he chatted
if msg:lower() == "open" then -- If the message matches open
door.Transparency = 0.5 -- Change transparency
door.CanCollide = false -- Change cancollide
end
end)
end)


I script -~ chimmihc
Report Abuse
SmokedPotato is not online. SmokedPotato
Joined: 12 Apr 2011
Total Posts: 480
10 Apr 2015 07:30 PM
Thanks, but..
msg:lower()
?
Report Abuse
jode6543 is not online. jode6543
Joined: 16 Jun 2009
Total Posts: 5363
10 Apr 2015 07:35 PM
string.lower("I'm a string!")
is the same as
("I'm a string!"):lower()
The same goes for all the other string manipulation functions. This is because this:
x:y(...)
is actually syntactic for this:
x.y(x, ...)
And also because metatables, but I won't delve into that for now.
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
10 Apr 2015 07:39 PM
OP says he's a scripter > OP can't figure out how to construct a basic Chatted event

k
Report Abuse
SmokedPotato is not online. SmokedPotato
Joined: 12 Apr 2011
Total Posts: 480
10 Apr 2015 07:41 PM
I never bothered to learn it.
Report Abuse
SmokedPotato is not online. SmokedPotato
Joined: 12 Apr 2011
Total Posts: 480
10 Apr 2015 07:42 PM
And I still don't know what message:lower means.
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
10 Apr 2015 07:43 PM
Yeah but if you, like you say you are, a scripter.. you undoubtedly could have just searched it up on the wiki and been on your way.
Report Abuse
SmokedPotato is not online. SmokedPotato
Joined: 12 Apr 2011
Total Posts: 480
10 Apr 2015 07:46 PM
I know a little bit of:
Swift
C++
C
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
10 Apr 2015 07:46 PM
:lower() is a string formatting method, it converts a given string into all lowercase letters.

string.lower('A') --> 'a'

local a = 'A'
a:lower() --> a

It's often used for eradicating unwanted specific cases in Chat commands.

If I do..

'if msg:lower() == "hello" '

then I can say: 'hello', 'Hello', 'HEllo', 'HelLo', 'hEllO'.. etc.. and they will all pass the if statement. Wheras if I had this;

'if msg == "hello" '

then I would HAVE to say 'hello' to activate it.
Report Abuse
SmokedPotato is not online. SmokedPotato
Joined: 12 Apr 2011
Total Posts: 480
10 Apr 2015 07:50 PM
Too late. I already looked it up on the Wiki.
Thanks.
Report Abuse
bojigglesmister2 is not online. bojigglesmister2
Joined: 26 Jun 2011
Total Posts: 1421
10 Apr 2015 09:01 PM
@Goulstem, who am i trying to impress? Lol. But your right
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