Lo202
|
  |
| Joined: 31 Jan 2013 |
| Total Posts: 579 |
|
|
| 10 Jul 2014 05:13 AM |
getservice = game:GetService("MarketplaceService")
function onChatted(msg, recipent, speaker) if (string.sub(msg, 1,5) == "info/") then local info = string.sub(msg, 5) local asset = getservice:GetProductInfo(info) message = Instance.new("Message", game.Workspace) message.Text = asset.Name.." : "..asset.Description end end function onEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) end
|
|
|
| Report Abuse |
|
|
| |
|
Lo202
|
  |
| Joined: 31 Jan 2013 |
| Total Posts: 579 |
|
| |
|
Lo202
|
  |
| Joined: 31 Jan 2013 |
| Total Posts: 579 |
|
| |
|
2eggnog
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 1351 |
|
|
| 11 Jul 2014 03:02 AM |
getservice = game:GetService("MarketplaceService")
function onChatted(msg, recipent, speaker) if (string.sub(msg, 1,5) == "info/") then local info = string.sub(msg, 6) local asset = getservice:GetProductInfo(info) message = Instance.new("Message", game.Workspace) message.Text = asset.Name.." : "..asset.Description end end function onEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) end |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 11 Jul 2014 03:04 AM |
local info = string.sub(msg, 5)
5 should be 6 and if not, try 7 |
|
|
| Report Abuse |
|
|
Geodesic
|
  |
| Joined: 02 Jun 2013 |
| Total Posts: 998 |
|
|
| 11 Jul 2014 03:15 AM |
you have no connection line for the onentered function
function onChatted(msg, recipent, speaker) if (string.sub(msg, 1,5) == "info/") then local info = string.sub(msg, 5) local asset = getservice:GetProductInfo(info) message = Instance.new("Message", game.Workspace) message.Text = asset.Name.." : "..asset.Description end end function onEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) end game.Players.PlayerAdded:connect(onEntered) |
|
|
| Report Abuse |
|
|
2eggnog
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 1351 |
|
| |
|
Lo202
|
  |
| Joined: 31 Jan 2013 |
| Total Posts: 579 |
|
| |
|