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

Command based issues?

Asked by 9 years ago

Basically, I'm making a command based hologram by myself..And I've got the inserting map command working, but there was an issue. The issue is when I use the command, it loads the maps and the two teams. But once I use a admin command script to change my team to red or blue. The team suddenly gets removed from the team folder..What did I do wrong?

The admin commands I use is from Kohl's Server Epix Suite. I'm not to this issue because it have always worked fine as a gui function.

local isAdmin = {["Titanshield"] = true, ["Player1"] = true, ["Player"] = true}

function Map1(message, player)
    if message == "//load map1" and isAdmin[player.Name] then

------------------------------------------------------------------------------------        
        Instance.new("Hint").Parent = game.Workspace
        game.Workspace.Message.Text = "Loading..Map1"
        wait(2)
        game.Workspace.Message:Destroy()
        game.ServerStorage.Map1:clone().Parent = game.Workspace
------------------------------------------------------------------------------------ 
        local b = Instance.new("Team")
        b.Parent = game.Teams
        b.AutoAssignable = false
        b.AutoColorCharacters = false
        b.TeamColor = BrickColor.new("Bright blue")
        b.Name = "Blue"
        game.ServerStorage.Team:clone().Parent = b
------------------------------------------------------------------------------------
        local r = Instance.new("Team")
        r.Parent = game.Teams
        r.AutoAssignable = false
        r.AutoColorCharacters = false
        r.TeamColor = BrickColor.new("Bright red")
        r.Name = "Red"
        game.ServerStorage.Team:clone().Parent = r
end
------------------------------------------------------------------------------------ 
end
game.Players.PlayerAdded:connect(function(player)
    player.Chatted:connect(function(message) Map1(message, player) end)
end)
------------------------------------------------------------------------------------

Answer this question