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: what am i doing wrong? (simple)

Previous Thread :: Next Thread 
Grandmaster_Askav is not online. Grandmaster_Askav
Joined: 06 Aug 2016
Total Posts: 662
22 Dec 2016 11:14 PM
game:GetService("Chat").Chatted:connect(function(msg)
print's'
print(msg)
if string.lower(msg) == "stop music" then
workspace.HardMusic:Stop()
elseif string.lower(msg) == "play music" then
workspace.HardMusic:Play()
end
end)

it doesnt print anything when i talk in chat
Report Abuse
OAuth2 is not online. OAuth2
Joined: 27 Nov 2016
Total Posts: 751
22 Dec 2016 11:15 PM
http://wiki.roblox.com/index.php?title=API:Class/Chat/Chatted

Check args
Report Abuse
Grandmaster_Askav is not online. Grandmaster_Askav
Joined: 06 Aug 2016
Total Posts: 662
22 Dec 2016 11:17 PM
i tried adding (part,msg,color)

in the brackets but it didnt chang anything
Report Abuse
Grandmaster_Askav is not online. Grandmaster_Askav
Joined: 06 Aug 2016
Total Posts: 662
22 Dec 2016 11:18 PM
still prints notthing

script.Parent:Play()

game:GetService("Chat").Chatted:connect(function(part,msg,color)
print's'
print(msg)
if string.lower(msg) == "stop music" then
workspace.HardMusic:Stop()
elseif string.lower(msg) == "play music" then
workspace.HardMusic:Play()
end
end)
Report Abuse
SameySam is not online. SameySam
Joined: 22 Mar 2012
Total Posts: 11040
22 Dec 2016 11:18 PM
Does it matter if u do print'x' rarther than print ("x")

Try that idk
Report Abuse
newcoolman2 is not online. newcoolman2
Joined: 01 Apr 2010
Total Posts: 2637
22 Dec 2016 11:18 PM
game.Players.PlayerAdded:connect(function(p)
p.Chatted:connect(function(msg)
print("s")
print(msg)
if msg:lower()=="stop music" then
workspace.HardMusic:Stop()
elseif msg:lower()=="play music" then
workspace.HardMusic:Play()
end
end)
end)


Report Abuse
newcoolman2 is not online. newcoolman2
Joined: 01 Apr 2010
Total Posts: 2637
22 Dec 2016 11:20 PM
@Samey it's still calling print so it doesn't matter

you can do

print



"hi"


and it will still work


Report Abuse
Grandmaster_Askav is not online. Grandmaster_Askav
Joined: 06 Aug 2016
Total Posts: 662
22 Dec 2016 11:20 PM
ohhh thanks ^
Report Abuse
OAuth2 is not online. OAuth2
Joined: 27 Nov 2016
Total Posts: 751
22 Dec 2016 11:20 PM
My bad. Completely forgot it doesn't work on solo mode.

http://wiki.roblox.com/index.php?title=API:Class/Players/PlayerAdded

Go to Notes for a fix.
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