So, the script is short and to the point it has comments throughout it to help you figure out why it wont work but I need help.
admins = {"brandonkludke2"} -- People who don't get teleported
id = 348229937-- the place id of it
tpcount = 0
h= Instance.new("Hint",game.Workspace)
h.Text = "Teleport count:"..tpcount-- the teleport count or how much people have been teleported
local TrueIfAllowed = function(player)
for _, admins in pairs(admins) do
if string.lower(admins) == string.lower(player) then
return true
end
end
end
for i, v in pairs(game.Players:GetPlayers()) do
if not TrueIfAllowed(v.Name) then
game:service("TeleportService"):Teleport(id,v.Character)
end
end
function PlayerEntered(player)
wait(0.00000000000001)
if not TrueIfAllowed(player.Name) then
game:service("TeleportService"):Teleport(id,player.Character)
tpcount = tpcount + 1
h.Text = "Teleport count:"..tpcount
end
end
game.Players.PlayerAdded:connect(PlayerEntered)

2 comments
Can you please be more specific with whats going on?
I would recommend adding this game into a universe. If it isn't already.