The value returns a nil value, even though it is there.
The script is in a model in a workspace
Model -Script -ServerLock (Variable already set to true) -off (Button to modify the variable when clicked) -on (Button to modify the variable when clicked)
The variable is there because it should be able to be adjusted in game.
local Admins = {'Builderman','KZskychi'}
local BanMessage = 'There is currently no flight on at present time or the server has been locked by an admin. Please check the group shout for flight times.'
game.Players.PlayerAdded:connect(function(player)
for i = 1, #Admins do
if script.Parent.ServerLock.Value == true then
if player.Name == Admins[i] then
else
player:Destroy()
player:Kick(BanMessage)
end
end
end
end)

3 comments
This error came up: attempt to index field 'Value' (a Boolean value)
What is the ServerLock instance in workspace? IntValue, StringValue, BoolValue???
BoolValue