I'm using a few chat commands in a game I'm producing. I've written out the admins' names correctly, however, whenever I go into test mode in studio it never seems to work. The chat commands only work for the first username after local Admin. Is there any way I can fix this? I don't need help on the actual command, I just need help on why the variables aren't working.
The script is below.
local Admin = 'iiQueenCobra59', 'matthewh1cks', 'LovelyMxddee', 'iimaddieoreo', 'queshtIons', 'DramticRainbowLover'
-- Lighting Command.
game.Players.PlayerAdded:Connect(function(plr) -- Dim Lighting.
if plr.Name == Admin then
plr.Chatted:Connect(function(msg)
if msg == "!lightsoff" then
for _,obj in pairs(game.Players:GetChildren()) do
game.Workspace.MainLighting.SurfaceLight.Brightness = 0.2
end
end
end)
end
end)
Any help would be appreciated.
