|
| 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
|
  |
| 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 |
|
|
|
| 22 Dec 2016 11:17 PM |
i tried adding (part,msg,color)
in the brackets but it didnt chang anything |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|
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 |
|
|