What is wrong with the scripts?
local admins = {"Incrility"}
function tableContains(t, value) for _, v in pairs(t) do if v == value then return true end end return false end
function onChatted(message, player) if message == "!setmode rcl" and tableContains(admins, player.Name) then reteam() end end
Script is intended to take players from team "trainee"(The color is white) and move them to 2 other teams Red and Blue (colors are Really Red and Really blue) The teams must be equal in size also the 2 other teams TRAINER "Black" and Green (Really Green) Must not be affected... IDK what i did wrong...
And Also
function tableContains(t, value) for _, v in pairs(t) do if v == value then return true end end return false end
function onChatted(message, player)
if input:sub(1, 9):lower() == "!setmode " and tableContains(admins, player.Name) then --If letters 1 to 9 are !setmode local tool = game.Lighting.tools:FindFirstChild(input:sub(10):lower()) if tool then tool:Clone().Parent = player.backpack tool:clone().parent = game.StarterPack end end
This was supposed to get the weapon named "sword" which is in Lighting under Tools and give it to player both in the backpack and starterpack... on command "!setmode Sword"