door = {} start = {} function checkdoor() for k,v in pairs(door) do local sphere = ents.FindInSphere( v:GetPos(), 60 ) for k,v in pairs(sphere) do //PrintTable(sphere) if v:IsPlayer() then print("v is player") if v:IsAdmin() then print("v is admin") local user = v user:PrintMessage(2,"You are allowed enter!") else findstart() local user = v for k,v in pairs(start) do local startpos = v:GetPos() user:SetPos(startpos) //user:PrintMessage(2,"You arent allowed to enter being teleported to start!") end end end end end timer.Simple(.75,checkdoor) end timer.Simple(3,checkdoor) function findstart() local find = ents.FindByName("start") PrintTable(find) for k,v in pairs(find) do table.insert(start,1,v) end end function finddoor() local find = ents.FindByName("door") for k,v in pairs(find) do //print("findings "..k..": "..v) table.insert(door,v) end end timer.Simple(1,finddoor)