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

Holo like script? Help?

Asked by
Irvene 5
10 years ago

So if I were to type in "Insert; bla" as the map name = bla, how could I make it connect to my speech?

-- What would go above here, before inserting the map?

local Map = game.ReplicatedStorage:FindFirstChild("MAPNAME")



function InsertMap()

local map = Map:Clone()

map.Parent = game.Workspace

end

1 answer

Log in to vote
-1
Answered by 10 years ago
    Server Script:
game.Players.PlayerAdded:connect(function(player)
    local admins = {}
    local maps = {}
    local switcher = ";"
    local func = require(game.ServerStorage.Chk)
    local commands = {["insert"..switcher] = function(message) 
        local get = nil
        for _, name in next, maps do
            if message:Find(name.Name) then
                get = name
                break
            end
        end
        local clone = get:Clone()
        clone.Parent = Workspace
        clone:MakeJoints()      
    end}
    player.Chatted:connect(function(message)
        local admin = func:AdminCheck(admins)
        if admin then
            newCall = func:CommandFind(message, commands)
            newCall(message)
        end
    end)
end)

Module Script:
tab = {}

function tab:AdminIndex(player, admins)
    for _, v in next, admins do
        if v:lower() == player.Name:lower() then
             return true
        end
    end
    return false
end

function tab:CommandFind(message, commands)
    for Name, func in next, commands do
        if message:find(Name) then
            return func
        end
    end
end

return tab
0
Don't just post code! Explain what you're doing in detail! Perci1 4988 — 10y
Ad

Answer this question