08-11-2011, 12:18 AM
I think this is what you need to do:
[lua]
function goTo(id)
local placeId = id + 0
game:load(placeId)
end
link(game.Players.ChildAdded, function(player)
link(player.Chatted, function(chat)
if string.sub(chat, 1, 5) == "goto/" then
goTo(string.sub(chat, 6))
end end) end)
[/lua]
[lua]
function goTo(id)
local placeId = id + 0
game:load(placeId)
end
link(game.Players.ChildAdded, function(player)
link(player.Chatted, function(chat)
if string.sub(chat, 1, 5) == "goto/" then
goTo(string.sub(chat, 6))
end end) end)
[/lua]