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
 

Output says nothing but this won't work. Any help please? >:(

Previous Thread :: Next Thread 
8Bawl is not online. 8Bawl
Joined: 24 Jun 2011
Total Posts: 544
24 Jul 2011 11:14 AM
--there's a model named sounds with sounds in it. Any help? >:\

function onPlayerEntered(newPlayer)

function onChatted(msg, recipient, speaker)

local source = string.lower(speaker.Name)

if (msg == "1") then
script.Sounds:findFirstChild("1"):play()
end

if (msg == "2") then
script.Sounds:findFirstChild("2"):play()
end

if (msg == "4") then
script.Sounds:findFirstChild("3"):play()
end

if (msg == "4") then
script.Sounds:findFirstChild("4"):play()
end

if (msg == "5") then
script.Sounds:findFirstChild("5"):play()
end

if (msg == "lol") then
script.Sounds:findFirstChild("L"):play()
end
end
end

game.Players.PlayerAdded:connect(function(newP)
onPlayerEntered(newP) if newP.Name == "8Bawl" then newP.Chatted:connect(function(msg) onChatted(msg, nil, newP) end) end end)
Report Abuse
SCARFACIAL is not online. SCARFACIAL
Joined: 28 Jan 2010
Total Posts: 7970
24 Jul 2011 11:22 AM
function onChatted(msg, speaker)

if (msg == "1") then
script.Sounds:findFirstChild("1"):play()
end

if (msg == "2") then
script.Sounds:findFirstChild("2"):play()
end

if (msg == "4") then
script.Sounds:findFirstChild("3"):play()
end

if (msg == "4") then
script.Sounds:findFirstChild("4"):play()
end

if (msg == "5") then
script.Sounds:findFirstChild("5"):play()
end

if (msg == "lol") then
script.Sounds:findFirstChild("L"):play()
end
end

game.Players.PlayerAdded:connect(function(newP)
onPlayerEntered(newP) if newP.Name == "8Bawl" then newP.Chatted:connect(function(msg) onChatted(msg, newP) end) end end)

Regards,
~Scarfacial
Report Abuse
8Bawl is not online. 8Bawl
Joined: 24 Jun 2011
Total Posts: 544
24 Jul 2011 11:26 AM
That doesn't work >:\
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
24 Jul 2011 11:46 AM
Tip use elseif
Report Abuse
dvmercado98 is not online. dvmercado98
Joined: 25 Jan 2010
Total Posts: 881
24 Jul 2011 11:46 AM
Maybe the sound assets haven't loaded yet.
Report Abuse
8Bawl is not online. 8Bawl
Joined: 24 Jun 2011
Total Posts: 544
24 Jul 2011 01:06 PM
No, something is wrong with the script.
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