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
 

Chatted Script

Previous Thread :: Next Thread 
swatteam773 is not online. swatteam773
Joined: 01 May 2009
Total Posts: 321
26 Sep 2013 07:04 PM
words = {"Fire","Make Ready","Ready"} --case sensitive to match the names of the sounds in lighting

game.Players.PlayerAdded:connect(function(np)
np.Chatted:connect(function(msg)
for _,v in pairs(words) do
if msg:lower():sub(1,#v) == v:lower() then
local t = game.Lighting[v]:Clone()
t.Parent = np.Character
t:play()
wait(1) --however long is the longest sound, I guess
t:stop()
t:destroy()
end
end
end)
end)

I've got the raw sounds in the lighting each named ""Fire, Make Ready, and Ready"". The script is supposed to make it so it plays the sound when you speak it. It doesn't seem to be working; i'm not that good with sounds. If anyone could help, that'd be great.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
26 Sep 2013 07:05 PM
It seems right...

Any output?
Report Abuse
swatteam773 is not online. swatteam773
Joined: 01 May 2009
Total Posts: 321
26 Sep 2013 07:44 PM
Nothing strangely enough.
Report Abuse
Arkose is not online. Arkose
Joined: 26 May 2013
Total Posts: 745
26 Sep 2013 07:45 PM
Error:

if msg:lower():sub(1,#v) == v:lower() then



words = {"Fire","Make Ready","Ready"} --case sensitive to match the names of the sounds in lighting

game.Players.PlayerAdded:connect(function(np)
np.Chatted:connect(function(msg)
for _,v in pairs(words) do
if msg:lower():sub(1,string.len(v)) == v:lower() then
local t = game.Lighting[v]:Clone()
t.Parent = np.Character
t:play()
wait(1) --however long is the longest sound, I guess
t:stop()
t:destroy()
end
end
end)
end)







~ắṝḱờṧἓ
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
26 Sep 2013 07:45 PM
Did you try using remove error monitoring system to test online and check if there are any errors?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
26 Sep 2013 07:46 PM
Arkose, that's not the error -.-
Report Abuse
Arkose is not online. Arkose
Joined: 26 May 2013
Total Posts: 745
26 Sep 2013 07:49 PM
You can use # to determine the length of the string? wat.

I don't see anything else.






~ắṝḱờṧἓ
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
26 Sep 2013 07:50 PM
Yeah, you can, you can test it by:

x = "test"
print(#x)
Report Abuse
Arkose is not online. Arkose
Joined: 26 May 2013
Total Posts: 745
26 Sep 2013 07:51 PM
t:destroy()

Capitalize the d






~ắṝḱờṧἓ
Report Abuse
swatteam773 is not online. swatteam773
Joined: 01 May 2009
Total Posts: 321
26 Sep 2013 07:51 PM
Lol you guys are confusing me.
Report Abuse
Arkose is not online. Arkose
Joined: 26 May 2013
Total Posts: 745
26 Sep 2013 07:51 PM
@Cnt

That's what I just did <3.






~ắṝḱờṧἓ
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
26 Sep 2013 07:52 PM
that lowercase d also doesn't matter lel
Report Abuse
Arkose is not online. Arkose
Joined: 26 May 2013
Total Posts: 745
26 Sep 2013 07:53 PM
Ik, it's just bothering me k






~ắṝḱờṧἓ
Report Abuse
swatteam773 is not online. swatteam773
Joined: 01 May 2009
Total Posts: 321
26 Sep 2013 07:53 PM
Some help would be nice. I've been trying to do this script for like 3 days now.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
26 Sep 2013 07:54 PM
Does the script break or does the music not play?
Test it by making it kill the character or something
Report Abuse
swatteam773 is not online. swatteam773
Joined: 01 May 2009
Total Posts: 321
26 Sep 2013 07:55 PM
I say the word, absolutely nothing happens. I honestly suck at scripting, hence why i'm on this forum, but it seems the output doesn't say anything, even when I remove and put it back in.
Report Abuse
Arkose is not online. Arkose
Joined: 26 May 2013
Total Posts: 745
26 Sep 2013 07:55 PM
inb4wearemissingsomethingsuperobvious






~ắṝḱờṧἓ
Report Abuse
swatteam773 is not online. swatteam773
Joined: 01 May 2009
Total Posts: 321
26 Sep 2013 08:02 PM
Bump..
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
26 Sep 2013 08:04 PM
"np.Character"
Make it to
"np.Character.Torso"
Report Abuse
swatteam773 is not online. swatteam773
Joined: 01 May 2009
Total Posts: 321
26 Sep 2013 08:06 PM
Trying that I suppose.
Report Abuse
swatteam773 is not online. swatteam773
Joined: 01 May 2009
Total Posts: 321
26 Sep 2013 08:12 PM
Nothing happens. fun.
Report Abuse
swatteam773 is not online. swatteam773
Joined: 01 May 2009
Total Posts: 321
26 Sep 2013 08:25 PM
bump
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