Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i fix this voice command?

Asked by 10 years ago
local Admin = {""}
local Owner = {""}
local Banned = {""}
local BuyAdmin = {""}

local mapName = {"Spaceship","Floatings",""} -- here put your mapnames for command map [Mapname]

function onChat(msg, recipient, speaker)

local source = speaker.Name

if source == Admin or source == Owner or source == BuyAdmin and
     string.sub(msg,1,10) == "choose map " and
     string.sub(msg,6) == mapName
    then
game.Lightning.mapName:clone()


    end 
end

    if source == Admin or source == Owner or source == BuyAdmin and
     string.sub(msg,1,10) == "remove map " then
    if string.sub(msg,6) == mapName
    then
game.Lightning.mapName:remove()

    end


    end

its not working its supposed to do choose map check if map in mapName list and put the map in workspace if it exists.

0
Can you please edit your post to correct the Lua formatting? BlueTaslem 18071 — 10y

Answer this question